Winters 1 Posted August 24, 2004 Hey guys i have an added action that i am using in a mission and the trouble is the first time i use it it gets removed but after having it active again it won't remove itself anymore. Does anyone know why it does this? it is a simple script but its making me nuts. here is the script: PlaceMarker.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> Player switchmove "CombatToPutDown" ~5 Player switchmove "PutDownToCombat" ~1 hint "Marker Placed" "marker1" SetMarkerType "Warning" player RemoveAction 0 exit I am using a trigger that activates when the player enters it and in its onavtivation i have: player addaction ["Place Marker", "PlaceMarker.sqs"] Now i made other scripts and markers and triggers that go PlaceMarker2.sqs, PlaceMarker3.sqs but once i activate this a second time the action does not remove itself from the list. Thanks Share this post Link to post Share on other sites
korax 4 Posted August 24, 2004 When you give an action, its 'number' is always one up from the previous action given, even if they dont have it any more.. so it will go up from 0, 1, 2, 3, 4, 5, etc.. You can instead use<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">player removeaction (_this select 2)Which will always remove the action that you just used. Share this post Link to post Share on other sites
Winters 1 Posted August 24, 2004 i will give it a shot, thanks  Share this post Link to post Share on other sites
m21man 0 Posted August 25, 2004 Or you assign the action a global variable and then remove it when you want to. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">action1 = player addaction ["Do Something","something.sqs"] ~5 player removeaction action1 exit Share this post Link to post Share on other sites
bn880 5 Posted August 25, 2004 or in that case a local variable is better <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_action1 = player addaction ["Do Something","something.sqs"] ~5 player removeaction _action1 exit but yeah, return value = action reference to object Share this post Link to post Share on other sites