Author Topic: problem with cycling  (Read 1814 times)

0 Members and 1 Guest are viewing this topic.

Offline robingravel

problem with cycling
« 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



Offline Lightfoot

Re:problem with cycling
« Reply #1 on: January 06, 2003, 09:21:39 AM »
Would SetCel() work?
Ich lerne deutsch

Offline robingravel

Re:problem with cycling
« Reply #2 on: January 06, 2003, 09:29:58 AM »
Thanks Lightfoot

It works.

Robin Gravel

Offline Lightfoot

Re:problem with cycling
« Reply #3 on: January 06, 2003, 09:32:48 AM »
No problem.  8)
Ich lerne deutsch

Offline robingravel

Re:problem with cycling
« Reply #4 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

Offline Lightfoot

Re:problem with cycling
« Reply #5 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.
Ich lerne deutsch

Offline robingravel

Re:problem with cycling
« Reply #6 on: January 06, 2003, 02:06:53 PM »
Thanks again.

My intro works.

Robin Gravel

Offline Lightfoot

Re:problem with cycling
« Reply #7 on: January 06, 2003, 02:54:42 PM »
No problem again  8)

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

Cya tomorrow.
Ich lerne deutsch


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.04 seconds with 22 queries.