micklivi1
Member-
Content Count
11 -
Joined
-
Last visited
-
Medals
Everything posted by micklivi1
-
How to use array with playmove
micklivi1 replied to micklivi1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks a lot dude, very helpfull! I've made 200 man OpFor march right into an ambush. Only way i could get them to walk in a straight line was to use animations! -
Hi, I'm setting up a scene where troops are walking down a road. I'm using playmove. I can get it to work when i have 1 unit. But i want to pass in an array of units. I don't know if my syntax is right, for using playmove with an array. But i keep getting errors. //Individual Unit for "_i" from 0 to 3 do { S1 playmove "AmovPercMwlkSlowWrflDf_ver2"; sleep 3.631; }; //Array of units PRIVATE troops = ["S1", "S2", "S3", "S4", "S5"] for "_i" from 0 to 3 do { {_x playmove "AmovPercMwlkSlowWrflDf_ver2"} FOREACH troops; };
-
How to use array with playmove
micklivi1 replied to micklivi1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Another quick question. I've added a while statement. troops=[S1, S2, S3, S4 , S5, S6, S7, S8, S9, S10, S11, S12, S13, S14, S15, S16]; while {alive t1} Do { {_x disableAI "ALL";_x switchMove "AmovPercMwlkSlowWrflDf_ver2";} foreach troops; _x disableAI "ALL";_x switchMove "Acts_Briefing_SB_Out";} foreach troops; } So that when "t1" dies i want them to stop marching. But what seems to happen is that on startup. My troops are skating along the ground (no animation) as soon as i kill "t1". They start doing th animation properly. -
How to use array with playmove
micklivi1 replied to micklivi1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hang, it's working! Must have had old crap lying around, thanks alot for your help dude! -
How to use array with playmove
micklivi1 replied to micklivi1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
That's crazy, you're right. When i past into the debug console. All is good(i also used the Bob's!) but when i put the same thing into my sqf, i get an error! -
How to use array with playmove
micklivi1 replied to micklivi1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks for the reply, unfortunately i'm getting an error. "Undefined variable in expression "troops"" PRIVATE troops = [S1, S2,]; {_x disableAI "ALL";_x switchMove "AmovPercMwlkSlowWrflDf_ver2";} foreach troops; I have tried with and without quotes around the variable elements and without the semi colon at the end of the array definition. Any ideas? -
How to use array with playmove
micklivi1 replied to micklivi1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
So would it be "_x switchmove "AmovPercMwlkSlowWrflDf_ver2"} FOREACH troops;"? -
Hi, I am just getting started in scripting. I have a basic script that makes a unit walk a certain distance. Then i wanted him to salute while another player is alive "t1". But it seems even when i kill "t1". He keeps saluting. Should the while loop not automatically finish when the condition "while {alive t1}" isn't met? I got around this by adding an exit condition, but this doesn't seem right as it defeats the purpose of a while loop. Thank you for any help. //S1 Move and salute for "_i" from 0 to 3 do { s1 playmove "AmovPercMwlkSlowWrflDf_ver2"; }; while {alive t1} do { hint "He's Alive"; s1 playmove "AmovPercMstpSnonWnonDnon_SaluteIn"; sleep 0.769; if (!alive t1) exitwith {}; }; if (!alive t1) then {hint "He's Dead"};
-
Script: Cannot exit while
micklivi1 replied to micklivi1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ahh, it's playmovenow. Works perfect now! Thanks for the help! -
Script: Cannot exit while
micklivi1 replied to micklivi1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I see so even if i use a while command. I will need to write an exit condition? -
Script: Cannot exit while
micklivi1 replied to micklivi1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The soldier S1 is saluting. When t1 dies, S1 is still saluting.