Jump to content

Making two animations sequences following each other


Recommended Posts

Hello,
I have an object containing 3 sequences of animation.

Forward: Off state
Left: Loop sequence
Backward: Clamp sequence (6 sec)

The object is Off by default.
When activated the Loop sequence plays, till activated again which will bring a message box with three choices.
- choice 1: triggers the Clamp sequence (played 1 time) then it should go back to Loop sequence.
- choice 2: goes back to loop
- choice 2: goes off

I can't make the Clamp sequence playing once then followed directly by the Loop sequence.

I'm trying with timers, but it doesn't seem to work. (I don't even see the debug mssg)

Any suggestion?

 

Here's one of my script attempt:

 

short isActivated ; start GameMode
short Button ; player's choice
short PlayVideo ; animation status
float Timer

Begin OnActivate
Activate
if PlayVideo == 0
Playgroup Backward 0
Set PlayVideo to 1
elseif PlayVideo == 1
ShowMessage PixChoice01Mssg
set isActivated to 1 ;starts Game Mode
endif
End

Begin GameMode
if isActivated == 1
set Button to GetButtonPressed
if Button == 0
Playgroup Left 1 ; Clamp sequence is played
if Timer < 6
set Timer to Timer + getSecondsPassed
else
Playgroup Backward 2 ; Loop sequence should start but doesn't
set Timer to 0
set isActivated to 0 ; back to OnActivate Mode
ShowMessage PixDebug01
endif

elseif Button == 1
Playgroup Backward 2 ; Loop sequence
set isActivated to 0 ; back to OnActivate Mode
elseif Button == 2
Playgroup Forward 1 ; goes to Off state
set PlayVideo to 0
set isActivated to 0 ; back to OnActivate Mode
set Stage to 0
endif
endif
End

 

 

Thank you!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...