Ford555 1 Posted January 6, 2013 i have a trigger activated by bluefor an it do: 0 = [thisTrigger,50] execVM "createzombie.sqf"; what createzombie.sqf do is every 10 seconds create a zombie in random position (50 meters near to the trigger) createzombie.sqf: _trigger=_this select 0; _amount=_this select 1; _triggerpos=[getPos _trigger select 0,getPos _trigger select 1,0]; if(T_Server) then { boss globalChat "Estad alerta muchachos, Zombies detectados en esa zona"; CLY_zombieclasses=[["TK_INS_Soldier_AAT_EP1","TK_INS_Soldier_4_EP1","TK_INS_Soldier_3_EP1","TK_INS_Soldier_2_EP1","TK_INS_Bonesetter_EP1"]]; //Random zombie classname CLY_randomzombie={ _zombie=CLY_zombieclasses select floor random count CLY_zombieclasses; while {typeName _zombie=="ARRAY"} do { _zombie=_zombie select floor random count _zombie; }; _zombie; }; for "_x" from 1 to _amount do { _class=call CLY_randomzombie; _side=east; _group=createGroup _side; _zombie=_group createUnit [_class,_triggerpos,[],50,"NONE"]; _zombie setdir (random 360); //Initialize zombification nul = _zombie execFSM "prueba1.fsm"; sleep 10; }; }; what i want is when i get out of the trigger's area, no more zombies keep going creating. somebody help me! please :) Share this post Link to post Share on other sites
f2k sel 164 Posted January 6, 2013 change the handle of the script to something other than a number or it won't work makeZ = [thisTrigger,50] execVM "createzombie.sqf"; then when you want to end the script use terminate makeZ from a trigger or script Share this post Link to post Share on other sites
Ford555 1 Posted January 6, 2013 change the handle of the script to something other than a number or it won't workmakeZ = [thisTrigger,50] execVM "createzombie.sqf"; then when you want to end the script use terminate makeZ from a trigger or script Perfect! thanks!,thanks for help me! it works perfect now!! Share this post Link to post Share on other sites