JohnKalo 657 Posted March 21, 2017 I cannot believe I need to create a new topic for this one buuuuut ............. So I got an mp mission at the works and at some point the players are to get in a chopper and extract. What I need is a way to add an action to the extraction helicopter. An action that will work in mp and that will only be available to people that are in the extraction helicopter. Not knowing if it will work in mp I have found this: this addAction ["Go Go Go","extraction.sqf",[this],0,false,true,""," driver _target == _this"]; but still this adds an action to the driver and not to the passengers. The players will be in passenger slots while the driver will be AI cotrolled so HEEEELP!! And not to forget, I have tried this but it has failed to work: this addAction ["Go Go Go","extraction.sqf",[this],0,false,true,""," passenger _target == _this"]; Share this post Link to post Share on other sites
Midnighters 152 Posted March 21, 2017 passenger isn't a valid command. I recommend you script this for the player, or add a event handler for "GetIn" and then add the command in the execution. Then just pass in the player variable to the action and then do (driver _target) == player)) Share this post Link to post Share on other sites
JohnKalo 657 Posted March 21, 2017 Thanks but ehhhh that would be way to complicated for me Isn't there anything simpler? I mean there is a way for the action only to be available for the driver. Isn't there a way to make the action available for the passengers or even for every member on board the chopper? For mp of course Share this post Link to post Share on other sites
schmoking 17 Posted March 21, 2017 this will give addaction to all seats of any aircraft make a repetable trigger with condition: vehicle player isKindOf "Air" and your code in activation field, i use it for an emergensy eject: ejectinit = player addAction ["<t color='#f80106'>EMERGENCY EJECT</t>", "Para\eject.sqf",[],9]; to remove it on exit make another repetable trigger with condition: vehicle player isKindOf "Land" in my activation field: player removeaction ejectinit; 1 Share this post Link to post Share on other sites
JohnKalo 657 Posted March 21, 2017 Thanks! It works!! but there is a problem... When I activate the "Go Go Go" action the player stays in the helicopters but stands up. He is no longer seated and his head is out of the chopper. How can I fix that one??? Scratch that. I fixed it myself. It was a forgotten played animation :) Thaaaaaaanks Share this post Link to post Share on other sites
MicroSeagZ 11 Posted April 18, 2017 This was helpful, thx. Share this post Link to post Share on other sites
noilliz 38 Posted April 18, 2017 Not sure if it's me, but it looks like you are making it way too confusing/complicated. Why not use the condition parameter in the addiction. Let me quote it from the addaction wiki page: Quote condition (Optional): String - script code that must return true for the action to be shown. Special variables passed to the script code are _target (object to which action is attached to) and _this (caller/executing person). Default value: "true" in there refer to a script that contains: _a = false; _veh = vehicle player; if (_veh isKindOf "Air") then { if (!driver _veh == player) then { _a = true; }; }; _a; Share this post Link to post Share on other sites