elijk88
Member-
Content Count
2 -
Joined
-
Last visited
-
Medals
Community Reputation
10 GoodAbout elijk88
-
Rank
Newbie
-
Need Help with RemoveAction
elijk88 replied to elijk88's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thaks BlueBlood but I tried placing another trigger with "nul = [] execVM "ActRem.sqf" and the script executes because the hint displays but the actions are not removed. I did not understand your first suggestion of placing "this and ((getpos (thislist select 0)) select 1 < 11)" in the activation field and didn't know were to place this code "Trigger - (thislist select 0) removeAction _gest1;" -
I have a script that activates when a player walks in the trigger that adds actions to perform specific animations. The player gets the actions fine on the action menu and all the animation works perfect in single player mode but does not work on the network for all players. In addition, I have been trying to remove the actions once the player move >11 meters away from the civilian but the script is not removing the actions. :confused:Here is the code: Gestures.sqf [spoiler]_gest1 = {player addaction [ _x select 1, "plamov.sqf", [(_x select 0)]} forEach [["AmovPercMstpSnonWnonDnon_ContemptSlap", "Contempt Slap"], ["AmovPercMstpSnonWnonDnon_GoAway", "Go away"]]; myLoc = createLocation ["NameVillage",(player modeltoworld [0,0,0]), 0.4 ,1.75]; myLoc setRectangular true; myLoc attachObject [player,[0,0,0]]; myLoc2 = createLocation ["NameVillage",(guy modeltoworld [0,0,0]), 0.4,1.75]; myLoc2 setRectangular true; myLoc2 attachObject [guy,[0,0,0]]; _gest2 = {player addAction [_x select 1, "plamovkiss.sqf",[(_x select 0)],5,false,true,"","(getpos civ1) in myloc && (getpos player) in myLoc2"]} foreach [ ["AmovPercMstpSnonWnonDnon_Kiss", "Kiss Greeting"] ]; _gest3 = {player addAction [_x select 1, "plamov_Handshak.sqf",[(_x select 0)],5,false,true,"","(getpos civ1) in myloc && (getpos player) in myLoc2"]} foreach [ ["AmovPercMstpSnonWnonDnon_Handshak", "Handshake"] ]; _gest4 = {player addAction [_x select 1, "plamov_HandshakKissHeartGreeting.sqf",[(_x select 0)],5,false,true,"","(getpos civ1) in myloc && (getpos player) in myLoc2"]} foreach [ ["AmovPercMstpSnonWnonDnon_HandshakKissHeartGreeting", "Handshake Kiss Greeting"] ];[/spoiler] plamov.sqf [spoiler]_anim = (_this select 3) select 0; publicexec ["true","_this switchmove ''",civ1]; //guy switchmove ""; publicexec ["true","_this switchmove ''",civ1]; //guy switchmove ""; publicexec ["true","_this switchmove ''",civ1]; //guy switchmove ""; civ1 playmove _anim;[/spoiler] plamovkiss.sqf [spoiler]_anim = (_this select 3) select 0; //civ1 switchmove ""; publicexec ["true","_this switchmove ''",civ1]; _dist = 1.6; _pos = getpos player;_pos2 = getpos civ1; if (primaryweapon player != "") then { player playmove "AmovPercMstpSobkWrflDnon"; player disablegeo [false, true, true, true]; _dist = 1.6; }; waituntil {animationstate player == "AmovPercMstpSobkWrflDnon" || animationstate player == "AmovPercMstpSnonWnonDnon"}; civ1 setpos (player modeltoworld [-0.2,_dist,0]); player setpos (player modeltoworld [0,0.7,0]); civ1 setdir ((getdir player) - 190); civ1 playmove _anim; sleep 0.2; player playmove _anim; waituntil {animationstate civ1 == _anim}; waituntil {animationstate civ1 != _anim}; civ1 setpos _pos2; player setpos _pos; player disablegeo [false, false, false, false];[/spoiler] plamov_Handshak.sqf [spoiler]publicexec ["true","_this switchmove ''",civ1]; _dist = 1.45; _pos = getpos player; _pos2 = getpos civ1; if (primaryweapon player != "") then { player playmove "AmovPercMstpSobkWrflDnon"; player disablegeo [false, true, true, true]; _dist = 1.4; }; waituntil {animationstate player == "AmovPercMstpSobkWrflDnon" || animationstate player == "AmovPercMstpSnonWnonDnon"}; civ1 setpos (player modeltoworld [-0.175,_dist,0]); player setpos (player modeltoworld [0.175,0,0]); civ1 setdir ((getdir player) - 180); civ1 playmove _anim; civ1 say "greet_informal"; sleep 0.2; player playmove _anim; waituntil {animationstate civ1 == _anim}; waituntil {animationstate civ1 != _anim}; civ1 setpos _pos2; player setpos _pos; player disablegeo [false, false, false, false];[/spoiler] plamov_HandshakKissHeartGreeting.sqf [spoiler]_anim = (_this select 3) select 0; //civ1 switchmove ""; publicexec ["true","_this switchmove ''",civ1]; _dist = 1.45; _pos = getpos player; _pos2 = getpos civ1; if (primaryweapon player != "") then { player playmove "AmovPercMstpSobkWrflDnon"; player disablegeo [false, true, true, true]; _dist = 1.4; }; waituntil {animationstate player == "AmovPercMstpSobkWrflDnon" || animationstate player == "AmovPercMstpSnonWnonDnon"}; civ1 setpos (player modeltoworld [-0.05,_dist,0]); player setpos (player modeltoworld [0.05,0,0]); civ1 setdir ((getdir player) - 180); civ1 playmove _anim; civ1 say "greet_informal"; sleep 0.2; player playmove _anim; waituntil {animationstate civ1 == _anim}; waituntil {animationstate civ1 != _anim}; civ1 setpos _pos2; player setpos _pos; player disablegeo [false, false, false, false];[/spoiler] ActRem.sqf [spoiler]player removeAction _gest1; hint "Actions removed"; [/spoiler] Thanks in advance!