Rawshark 11 Posted March 16, 2018 For a MP server I'm trying to setup an area trigger where if entered by a vehicle, the trigger will empty the fuel tank. Now I know an easy way to do this is to name the vehicles and then add in to the trigger" vehiclename setfuel 0;" etc but I was wondering if there was an alternative way to remove fuel without having to name all the vehicles on the server? I've been trying various iterations of 'setfuel' like so, but none of them seem to work or do what I want. [_vehicle] remoteexec [setfuel 0, _vehicle]; If anyone can point me in the correct direction, that would be marvellous, thanks! Share this post Link to post Share on other sites
pierremgi 4739 Posted March 16, 2018 trigger repeatable, anyBody present condition: this && isNil "dump" On activation : if ( (thisList select 0) isKindOf "landVehicle") then { [(_this select 0),0] remoteExec ["setfuel", (this select0)] }; dump = true On deAct: 0 = [] spawn { sleep 2; dump = nil} Share this post Link to post Share on other sites
Rawshark 11 Posted March 16, 2018 38 minutes ago, pierremgi said: trigger repeatable, anyBody present condition: this && isNil "dump" On activation : if ( (thisList select 0) isKindOf "landVehicle") then { [(_this select 0),0] remoteExec ["setfuel", (this select0)] }; dump = true On deAct: 0 = [] spawn { sleep 2; dump = nil} Heya, apparently there is a generic error in the On Activation expression. I can't seem to execute it, sorry Share this post Link to post Share on other sites
pierremgi 4739 Posted March 16, 2018 Yeah, too kick written. Test that: Trigger set to none,none, non repeatable condition: true on Act : 0 = thisTrigger spawn { while {true} do {{ if (_x isKindOf "landVehicle" && _x inArea _this) then { [_x,0] remoteExec ["setfuel",_x]; _x setVariable ["fuel",false] } } forEach (vehicles select {isNil {_x getVariable "fuel"}}); sleep 2 }} 2 Share this post Link to post Share on other sites
Rawshark 11 Posted March 16, 2018 Thanks, I'll give it a shot. At a glance though I am not sure if it will work if the trigger activation is set to none, maybe none, BLUFOR, non repeatable? I'll test it out and let you know Edit: Cheers, it works like a charm! Thank you so much!! Share this post Link to post Share on other sites
jgaz-uk 130 Posted January 24, 2019 A simple yourvehiclename setFuel 0 in the trigger init, will work along with yourvehiclename in thislist in the trigger condition. activation whatever force vehicle is, or anybody not present trigger size 0. Also useful if you don't want a vehicle or aircraft to move until something else happens (eg, as in escorting attack helicopters with an extract helicopter, they hover in formation all the time) Thevehiclename setFuel 0 in the vehicle init & then Thevehiclename setFuel 1 in a trigger, waypoint or script. Share this post Link to post Share on other sites