Pause actor's movement
Dooki
Member Posts: 247
Hey all,
I have a free moving actor. Where I click the actor moves. He's a thief who travels from lock to lock and opens them. I want him to pause when collides with a lock before moving on to the next. I have it set up so that when he comes to a lock a progress bar animation plays (7 sec). So, I want him to pause, or not be able to leave, for 7 sec. I've played with putting a 7 sec timer into the mix but it does nothing. Any thoughts?
Thanks!
I have a free moving actor. Where I click the actor moves. He's a thief who travels from lock to lock and opens them. I want him to pause when collides with a lock before moving on to the next. I have it set up so that when he comes to a lock a progress bar animation plays (7 sec). So, I want him to pause, or not be able to leave, for 7 sec. I've played with putting a 7 sec timer into the mix but it does nothing. Any thoughts?
Thanks!
Comments
Let's call it 'lockpause'.
In a controller actor, put in the rule:
If actor collides with lock,
Then for 7 seconds let lockpause = true
Otherwise lockpause = false
On your main character, have the rule:
If lockpause = true
Play 7 second crouching animation.
In the 'otherwise' section put all your rules for normal movement and animation.
That should do it.
Hope it helps,
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
Controller-
Rule
When actor collides with lock
-Timer 7 sec
--Change Attribute: game.lockpause=true
--Otherwise
---Change Attribute: game.lockpause=false
Main actor-
Rule
Attribute: game.lockpause= true
-Timer 7 sec
--Animate (add images)
--Otherwise
---Animate (Original walking animation)
Note: Prior to this I had my animation attribute by itself. I found that if I included it within my movement rule the animation did not play.
Thanks again!
Yup, I typed in "true,false." I did not have any attributes that used parentheses. Should I have? Can you tell me if what I set up (above) is indeed what QS recommended? Thanks!