Wisp 10 Posted March 28, 2014 Hi all. So I'm following the advice given in this thread: http://forums.bistudio.com/showthread.php?110579-Chopper-Land-at-Smoke I have a helicopter set to move to a position. Then I have trigger, with the condition: "heli1 nearObjects ["SmokeShellGreen",200];" and activation: "createVehicle ["Land_HelipadEmpty_F",getPosATL "SmokeShellGreen", [], 0, "None"] && heli1 land "GET IN";" I get the error "type array, expected bool". What am I doing wrong? Share this post Link to post Share on other sites
cobra4v320 27 Posted March 28, 2014 I have made an extraction example that does this here: http://forums.bistudio.com/showthread.php?174429-Extraction-Example What you are trying to do wont work in a trigger. Share this post Link to post Share on other sites
Wisp 10 Posted March 28, 2014 Your script is nice, but it doesn't suit my needs precisely. I don't want to create a new helicopter, I want an existing one to perform the extraction. Share this post Link to post Share on other sites
cobra4v320 27 Posted March 28, 2014 (edited) Something like this then should work. Radio Trigger Cond: this && ((count ((markerpos "extractMrk") nearObjects ["smokeshell", 50])) > 0) On Act: _null = [] execVM "extractPos.sqf" extractPos.sqf _smokeArray = []; _smokeArray = (position player) nearObjects ["SmokeShell",50]; _smoke = _smokearray select 0; _smokePos = position _smoke; _extractPos = createVehicle ["Land_HelipadEmpty_F", _smokePos, [], 0, "NONE"]; Then you would need to create a waypoint to the _extractPos. Edited March 28, 2014 by cobra4v320 Share this post Link to post Share on other sites
barbolani 198 Posted March 28, 2014 The best way I found to do what you want is a combination of event handlers and scripts. Do this with triggers seems very complicated. First, whenever you please, add an eventhandler to the player: player addEventHandler ["fired", {_this execVM "evacuacion.sqf"}]; And the script: _magazine = _this select 5; _smoke = _this select 6; if ( _magazine == "SmokeShellGreen" ) then { hint "smoke!"; player removeEventHandler ["Fired", 0]; sleep 5; _smokepos = getPos _smoke; _pad = createVehicle ["Land_HelipadEmpty_F", _smokePos, [], 0, "NONE"]; //here you may code the heli to move to the heli pad, land, wait for anybody in the heli etc.. } Coded in the office, may have mistakes... Share this post Link to post Share on other sites
Rapax 10 Posted March 28, 2014 (edited) EDIT. My solution its not working. sorry:( Edited March 28, 2014 by Rapax Share this post Link to post Share on other sites
cobra4v320 27 Posted March 28, 2014 (edited) The eventhandler is a good idea but what if you use smoke for cover during the mission? I guess you could add the eventhandler once the mission reaches a certain point. Edited March 28, 2014 by cobra4v320 Share this post Link to post Share on other sites
barbolani 198 Posted March 28, 2014 Exactly. I add the EH when the evac is needed, not from the begining of the mission. Share this post Link to post Share on other sites
cobra4v320 27 Posted March 28, 2014 That makes sense and it would be easier and cleaner than a trigger. Share this post Link to post Share on other sites
Rapax 10 Posted March 29, 2014 i copied this code somewhere and yesterday when i wanted post it, did not work me, I do not know why. :confused: its not sophisticated but could be helpful here. Give the trigger a name, e.g. "smoketrigger" Condition: count (position smoketrigger nearObjects ["SmokeShell",50])!=0 Size trigger: - / - Activation: None Repetidamente onAct: hint "smoke" onDea: "no smoke" This will trigger when a white smoke flies in the trigger, will detect any smoke grenade within a 50 meter radius. S! Share this post Link to post Share on other sites
Wisp 10 Posted March 31, 2014 (edited) Exactly. I add the EH when the evac is needed, not from the begining of the mission. I tried out your method and it works great as well. If it's cleaner than a trigger, I guess I'll go with it. But wrote it to so it applies to 'player'. I need to it to work in multiplayer for any member of a specific group. How would I modify it to work for that? Also I used this to get the helo to land and the squad to get in: _wp = group_attack7 addWaypoint [position _pad, 0]; _wp setWayPointType "LOAD"; _wp2 = group_attack3 addWaypoint [position _pad, 15]; _wp2 setWayPointType "GETIN"; [group_attack7, 1] synchronizeWaypoint [[group_attack3, 1]]; I think the synchronization isn't working because the helo doesn't land. Not sure what I'm doing wrong. Edited March 31, 2014 by Wisp Share this post Link to post Share on other sites
drunken officer 18 Posted March 31, 2014 http://hx3.de/editing-scripting-187/hilfe-heli-evakuierungs-script-23283/#post466677 I have now the version 2.0 There its possible to define a group, which one should be pick up. And the call can throw any grenade. Share this post Link to post Share on other sites
barbolani 198 Posted March 31, 2014 Hi, I'm shit on MP scripting but I guess you may set an array of playable units and add the EH forEach that array... Try a MOVE waypoint with a LAND command instead a LOAD waypoint, because maybe the heli is waiting until you order the units to getin (happened to me) The trick for synch the heli and passengers: you are adding waypoints via scripting, just don't add any other waypoint to the heli after the LOAD, until all the units in the group are in the heli... then, add waypoints or doMove Share this post Link to post Share on other sites