Search the Community
Showing results for tags 'Removeaction'.
Found 4 results
-
rRemoveaction in Framework
CreativeProduct posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hello there, I seem to have a little of an issues regarding the multiplayer frameweork. Long story short, I am using the multiplayer framework to add an actionand to remove it afterwards (see example below). However, removing that specific action doesn't seem to work, does anyone have an idea why? Thanks in advance! _gear = [nil , _unit, rAddAction, "Gear", "client\gear.sqf",[],-1,false] call RE; [nil, _unit, "per", rREMOVEACTION, _gear] call RE; Everything seems to work in my script, but the removeaction part. There's also stuff going on after the Removeaction part which works perfectly well.- 3 replies
-
- rremoveaction
- removeaction
-
(and 1 more)
Tagged with:
-
Need help with addAction/removeAction in MP
Rebitaay posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey all, I've been trying to set up a Mobile-HQ in my mission. The actual script isn't made yet, because I've been trying to get the actions working for some time now. I'm attempting to add and remove actions from a vehicle using BIS_fnc_MP. It kind of works, but has very strange behavior which creates many issues. initServer.sqf [[MHQ1, ["Deploy MHQ", "Scripts\MHQ_Deploy.sqf"]], "addAction", true, true] call BIS_fnc_MP; MHQ_Deploy.sqf _MHQ = _this select 0; _player = _this select 1; _ID = _this select 2; [[_MHQ, _ID], "removeAction", true, true] call BIS_fnc_MP; sleep 0.5; [[_MHQ, ["Pack-Up MHQ", "Scripts\MHQ_Packup.sqf"]], "addAction", true, true] call BIS_fnc_MP; MHQ_Packup.sqf (Pretty much the same) _MHQ = _this select 0; _player = _this select 1; _ID = _this select 2; [[_MHQ, _ID], "removeAction", true, true] call BIS_fnc_MP; sleep 0.5; [[_MHQ, ["Deploy MHQ", "Scripts\MHQ_Deploy.sqf"]], "addAction", true, true] call BIS_fnc_MP; I think the issue here is my vague understanding of BIS_fnc_MP, which the wiki doesn't explain very well. I've tried every combination of the two booleans (both set to true in the examples), and it always does something different that doesn't quite work. Sometimes it only shows for me, people see different options in different amounts, and sometimes a JIP player using the action will create duplicates on my end. The intended way for it to work is when you use the "Deploy MHQ", it will remove the "Deploy MHQ" action and add the "Pack-Up MHQ" action, and vice-versa. The state it's in will need to apply to JIP players as well (e.g. If it's deployed, JIP should be able to pack it up). Other features are intended of course, but not yet scripted. Am I doing something wrong with setting up the actions, or should I just be coding it with a different method? -
SiC_fnc_placeSandBag = { _sandBag = createVehicle ["Land_BagFence_Long_F",(_this select 1) modelToWorld [0,2,0], [], 0, "CAN_COLLIDE"]; _sandBag setDir getDir (_this select 1) - 180; _id = _sandBag addAction ["Remove Sandbag", {call SiC_fnc_removeSandBag}]; }; SiC_fnc_removeSandBag = { deleteVehicle (_this select 0); }; _id = player addAction ["Place Sandbag", {call SiC_fnc_placeSandBag}]; SiC_fnc_placeFlag = { _sandBag = createVehicle ["FLAG_US_F",(_this select 1) modelToWorld [0,2,0], [], 0, "CAN_COLLIDE"]; _sandBag setDir getDir (_this select 1) - 180; _id = _sandBag addAction ["Remove Flag", {call SiC_fnc_removeFlag}]; }; SiC_fnc_removeFlag = { deleteVehicle (_this select 0); }; _id = player addAction ["Place Flag", {call SiC_fnc_placeFlag}]; SiC_fnc_placeSupplies = { _sandBag = createVehicle ["CUP_USBasicAmmunitionBox",(_this select 1) modelToWorld [0,2,0], [], 0, "CAN_COLLIDE"]; _sandBag setDir getDir (_this select 1) - 180; _id = _sandBag addAction ["Remove Supplies", {call SiC_fnc_removeSupplies}]; }; SiC_fnc_removeSupplies = { deleteVehicle (_this select 0); }; _id = player addAction ["Place Supplies", {call SiC_fnc_placeSupplies}]; SiC_fnc_placeConcertinaWire = { _sandBag = createVehicle ["ACE_ConcertinaWireCoil",(_this select 1) modelToWorld [0,2,0], [], 0, "CAN_COLLIDE"]; _sandBag setDir getDir (_this select 1) - 180; _id = _sandBag addAction ["Remove Concertina Wire", {call SiC_fnc_removeConcertinaWire}]; }; SiC_fnc_removeConcertinaWire = { deleteVehicle (_this select 0); }; _id = player addAction ["Place Concertina Wire", {call SiC_fnc_placeConcertinaWire}]; So I put this into a radio trigger and it works fine. The problem is when I use this: removeallactions player It also removes the advanced towing, sling loading, rappelling, and urban rappelling from the action menu. I need either a way to exempt these from the removeallactions. (No Progress) or I need the action ids or what to put in the second trigger. (Some progress I've gotten close) i changed all the "_id" to "id" and it got as close as removing the "Place Concertina Wire" option but that is all using player removeaction id I sincerely feel this myaction = player addAction ["Hello", "hello.sqs"]; and player removeAction myaction; holds the answer to my problem. I tested it without my content and it did what I want.
- 2 replies
-
- addaction
- removeaction
- (and 6 more)
-
New Scripter, Trivial Question!
Rhys Priestland posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello there, I'm making a control tower that can control multiple border gates for an upcoming server. Relatively new to scripting, and only know the abseoulte basics. All have to start somewhere. So the set up is, I have an addiction to open the script file on the Init of a object. Firstly how would I remove that add action after it has executed the script file Next part, the script so far (pls dont comment on my newbness :) _target = _this select 0; _caller = _this select 1; _actionId = _this select 2; //North Gate 1 _caller addAction ["Open North Gate 1", {NG_1 animate ["Door_1_rot", 1]}]; _caller removeAction _actionId; _caller addAction ["Close North Gate 1", {NG_1 animate ["Door_1_rot", 0]}]; _caller removeAction _actionId; So what this displays is only the second addaction, Close northgate 1, which is not what I would want to do. Ideally I would like to the person to only see the Close North Gate Addaction after executing the open northgate Addaction and for the Open Northgate addaction to be removed?. Im unsure how to write this using the SQF syntax, and have been scratching my head for the last 2 hours. Also after executing Close Northgate I would like them to see the Open northgate again. How would I go about doing this? Thanks for any help you give me! Regardless of the type of help, all help will be greatly appreciated Best Regards Rhys Priestland