Jump to content
Sign in to follow this  
santafee

Exit a Script.sqs with trigger

Recommended Posts

I want to exit a script ingame with an trigger,cause the guys lying bounded there dont exit the animation.Tried it with enableAI Move and Anim,no sucess.So i need a way to delete or just exit the Script ingame.The opposite of the "this exec skript.sqs"....Thanks .....!

Share this post


Link to post
Share on other sites

Did you try switchMove "" ? That should bring them back upright.

As far as i know there's no command to exit a script through a trigger. And maybe you could post your script so we can see what you did?

Share this post


Link to post
Share on other sites

Thanks,switchmove "" works!But i dont like that they are standing without getting up before,1 sec to the next.Usually if they leave the animation,they stand up slow.Well il try a bit again,thx!

;Animationsskript

Soldat1 switchMove "CivilSitting";

Soldat1 disableAI "Anim;Soldat1 disableAI "Move";

Soldat2 switchMove "CivilSitting";

Soldat2 disableAI "Anim;Soldat2 disableAI "Move";

Exit

Now they join my group with a trigger if im <=3 to one of them,but they dont exit the animation and stand up.I tried enabling the AI Anim and Move with the join Trigger again,didnt work.Also i tried completely without disabling the AI,they dont stand up..;-(

Edited by Himmelsfeuer

Share this post


Link to post
Share on other sites

I seem to recall that there is a command for this... but I dont remember what it is.

Share this post


Link to post
Share on other sites

you can exit/stop sqf scripts with command "terminate", no idea about sqs

Share this post


Link to post
Share on other sites
Soldat1 switchMove "CivilSitting";

Soldat1 disableAI "Anim;Soldat1 disableAI "Move";

Soldat2 switchMove "CivilSitting";

Soldat2 disableAI "Anim;Soldat2 disableAI "Move";

Missing a " on the end of Anim.

And why not use soldat2 stop true;

Share this post


Link to post
Share on other sites

i have to push this now, need a solution again

i just want to stop a running timer in a sqsFile, but if i just delete the trigger, the skript still runs...

how can i EXIT a SQS File with a Trigger?

thanks!

Share this post


Link to post
Share on other sites

You just need a variable that's checked within the loop and when it becomes true it forces the script to exit.

example

exitcode=0

#loop
~1
hint format ["Timer %1",time]
?( exitcode == 1): goto "end"
goto "loop";
#end
exit

in your trigger you would put exitcode=1

Edited by F2k Sel

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×