ID:177367
![]() Sep 16 2002, 6:21 pm
|
|
I am tring to play a icon movie one time through then stop. I also want you to not be able to move wile it is playing. I know I can play it once with the flick command. How do I lock the player so he can't move?
|
That wont work with out a sleep command. If you say
Cast() usr.lock = 1 flick('spell.dmi',usr) usr.lock = 0 It will play through and unlock the player. How can I stop this with out a sleep command? |
You can't stop it without a sleep command. You just need to add in a sleep command after the flick() that is roughly the same length as the animation.
|
<code>mob/var/lock = 0</code>
Then, in the Move() proc, check to see if lock is true, and if it is, cancel the move proc. If it is not, continue normally.
<code>mob/Move() if(src.lock) return else ..()</code>
Now if the mob's lock variable is true (1), then the mob will be unable to move. If it is false (0), then the mob will move around normally.