OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Harvey on 15 Dec 2004, 11:10:48
-
Hi everyone
I have a guy doing pressups who is also a captive. He is with some other captives. When the trigger fires to set them free and join the players group, he freezes for a bit and then just carries on doing his pressups (although he has joined the group). The loop I have is :
#pushups
_cap5 playmove "FXStandDip"
?! (alive capguard1): goto "end"
goto "pushups"
#end
exit
Where capguard1 is the guard who is guarding the captives. Once he is dead, the other captives stop being captives and join my group, but this 1 soldier just keeps doing push ups !!!
I have a command stating _cap5 switchmove "NULL" further up in the script - do I need to make this a playmove "NULL" because he is doing a playmove rather than a switchmove ??
Any help please ??
Many thanks
-
Are the others guys doing pushups as well? And do they stop ok?
Put a delay in the loop
~2
for a start. Playmove null can't do any harm.
Add some hints to check that the script is running the way you think it is.
-
No, the other captives have their hands behind their heads (FXStandSurUniv), they are not in any sort of loop. When the trigger fires, they stop standing like captives and join my group. Push up man joins my group as well, but carries on exercising. As soon as the trigger fires, he freezes for a bit and then goes back to doing pushups.
playmove null keeps him doing pressups regardless, so I guess it will have to be switchmove.
-
many anims/switchmoves seem to stack, like te walking one, this probabley does the same, so you are giving him tons of these, and he has to finish all of em before he can do anything.
so putting a delay that is equal or greater to the time it takes him to do the anim, and it should work better