OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: domomo on 08 Sep 2007, 15:06:21
-
I am sorry if this is obvious, but i'd like to know how to pause a script at a certain point and when a trigger ingame is activated the script continues.
so i can avoid making countless scripts for everything :S
-
Hm...is it sqs or sqf? Anyway, give you examples for both. Make your trigger to set a self defined variable to TRUE (my_variable = true). Then in a sqs script, enter this line:
@ my_variable
and in a sqf script, it's this line:
waituntil {_my_variable};
But you should think about ripping you script into pieces since a wait command doesn't really put a script to sleep (doin absolutely nothing) but checks a condition which is also "work".
Myke out
-
so i should avoid this tactic?
-
Not if you keep this in mind and take care that not too many scripts are suspendedd this way. A handful of scripts supended will not drop performance extremly, but if you encounter performance problems while creating your mission, this could be one point to free some ressources.
So, no, you don't have to avoid completely, but always have an eye on it.
Myke out
-
thanks