Community

SCI Programming => Mega Tokyo SCI Archive => Topic started by: robingravel on January 05, 2003, 11:47:00 PM

Title: problem with cycling
Post by: robingravel on January 05, 2003, 11:47:00 PM
Hi.

Here's my problem:

I want to cycling the view from the last cel to the 0 cel.

(teing:
  init(15 cdBACKWARD)
  setCycle(Beg)
  (teing:show())
 )
(instance teing of Act
 (properties
  x 93
  y 130
  view 26
  //loop 15
 )
)

The actor shows in the game at the first cel and begin
to cycle from the last cel to the first cel.

How I can showing the view from its last cel, not the first cel?

Thanks in advance.

Robin Gravel
Title: Re:problem with cycling
Post by: Lightfoot on January 06, 2003, 09:21:39 AM
Would SetCel() work?
Title: Re:problem with cycling
Post by: robingravel on January 06, 2003, 09:29:58 AM
Thanks Lightfoot

It works.

Robin Gravel
Title: Re:problem with cycling
Post by: Lightfoot on January 06, 2003, 09:32:48 AM
No problem.  8)
Title: Re:problem with cycling
Post by: robingravel on January 06, 2003, 10:34:59 AM
My intro is still not finished yet.

Once the cycle is finished, this person should say "I'm back!" but I don't know how.

I tried

 (method (cycleDone)
  Print("I'm back!")
 )

but nothing happens.

Robin Gravel
Title: Re:problem with cycling
Post by: Lightfoot on January 06, 2003, 11:30:53 AM
Create a Script to handle it

Code: [Select]
(instance MyScript of Script
            (properties)
            (method(changeState newState)
            = state NewState
           (switch(state)
                  (case 0
                          (send gEgo:setCycle(Fwd))
                          //set number of cycles to wait before next state//
                          = cycles 10 //10 = number of cels in loop//
                  )
                  (case 1
                           Print("I'm Back!")
                  )
           )
)

Then when you want to activate the script, say in your initialization code.

Code: [Select]
(MyScript:changeState(0))

There may be a better way, but I am sure this works.
Title: Re:problem with cycling
Post by: robingravel on January 06, 2003, 02:06:53 PM
Thanks again.

My intro works.

Robin Gravel
Title: Re:problem with cycling
Post by: Lightfoot on January 06, 2003, 02:54:42 PM
No problem again  8)

But now I am going home, no internet at home.

Cya tomorrow.