cychou 11 Posted February 28, 2014 (edited) hello, i would need help to create a trigger that would destroy a precise type of empty vehicle entering the trigger area. i use a mission (Domination) already containing trigger for bases safe zone, but the problem is it can't be triggered by empty vehicle, so if a player airlift an empty MHQ vehicle and make the mistake to fly above the enemy safe zone he will be killed, but not his empty mhq. and he will not be able to take it back. any help would be very welcome. thx Edited February 28, 2014 by cychou Share this post Link to post Share on other sites
Persian MO 82 Posted February 28, 2014 i didn't test this yet. - create a empty H in opfor base, name it: opfor base - create trigger "size cover base" "activation: blufor, present, repeat" in trigger on act: {if (!(isplayer _x)) then {deleteVehicle _x;};} foreach nearestobjects [opfor_base,[ "HMMWV_DES_EP1","MtvrSupply_DES_EP1" ],500]; * "HMMWV_DES_EP1","MtvrSupply_DES_EP1" change with blufor vehicles u want to delete in opfor base. do this same for blufor base Share this post Link to post Share on other sites
cychou 11 Posted March 1, 2014 (edited) thank for the reply. unfortunately the script did not work. Edited March 1, 2014 by cychou Share this post Link to post Share on other sites
Persian MO 82 Posted March 1, 2014 Try this one. - Create a game logic in opfor base Gamelogic init null=this spawn {while {true} do { {if (!isplayer _x) then {deletevehicle _x}} foreach (nearestobjects [position _this,["HMMWV_DES_EP1","MtvrSupply_DES_EP1"],200]); sleep 30;}} Each 30 sec delete this 2 vehicles Share this post Link to post Share on other sites
Green- 10 Posted March 1, 2014 Ok, follow theese steps and it should work: 1. Make a H (Invisible) in the opfor base and name it opfor_base 2. Make a trigger covering the whole opfor base and add this in the "On Act." Field: {if (!(isplayer _x)) then {deleteVehicle _x;};} foreach nearestobjects [opfor_base,[ "LAV25_HQ" ],500]; 3. Make the trigger get activated when civilian is present and make sure it repets. 4. Place a civilian AI within the trigger area and in the init add removeallweapons this; this allowdamage false; this enableSimulation false; That way the trigger activates beacuse the civilian ai keep on activating it, the lav hq despawn everytime it gets inside empty and the Civilian AI cant move so he will just stand there for ever activating the trigger Vice versa for Blufor base. Hint: Im pretty sure the 500 in the code for the trigger stands for how close to the helipad the lav can be before despawning aswell but you will have to ask Persian MO to confirm that. Also this is a bad way of activating a trigger im pretty sure but its easy to understand :) Cred for everything goes to persian MO I just explained how the use it! Best of luck with you mission! Green| Share this post Link to post Share on other sites
cychou 11 Posted March 1, 2014 (edited) I tested both of your methods (Persian MO and Green), sadly none of them are working. the first method given by Persian an by green (who are the same) doesn't kill the empty vehicle. the second method by Persian doesn't despawn the empty vehicle. but i'm sure you will find out Edited March 1, 2014 by cychou Share this post Link to post Share on other sites
Joe98 92 Posted March 1, 2014 Suggestion: When you place a vehicle on the map, you can set the health of the vehicle to zero. Or, if you place the vehicle by way of a script, within the script there is a command that sets the health of the vehicle. Find that command (sorry I don't know it). When the script fires, the health of the vehicle is set to zero. Share this post Link to post Share on other sites
eegore 11 Posted March 1, 2014 its vehicle name or type, setdamage 0 "LAV25_HQ" setdamage 0 Share this post Link to post Share on other sites
cychou 11 Posted March 1, 2014 (edited) its vehicle name or type, setdamage 0"LAV25_HQ" setdamage 0 what i'm looking for is a trigger that can destroy an empty vehicle. the solutions given above aren't working for me, if someone else can confirm these solutions don't work. (I hope i'm not making mistake when doing it). Edited March 1, 2014 by cychou Share this post Link to post Share on other sites
Green- 10 Posted March 1, 2014 Does it matter what vehicle it is? Is opfor a playable faction? Share this post Link to post Share on other sites
cychou 11 Posted March 1, 2014 (edited) Does it matter what vehicle it is? Is opfor a playable faction? yes the vehicle type matter. the trigger is needed for the russian MHQ (BTR90_HQ) when entering in blufor base and the for American MHQ (LAV25_HQ) when entering in opfor base. both blufor and opfor are playbale factions in my mission (Domination ACE TVT). Edited March 2, 2014 by cychou Share this post Link to post Share on other sites
cychou 11 Posted March 2, 2014 what i would need is a trigger that would contain such kind of OnACT : {if (!(typeof _x=="BTR90_HQ")) then {_x setdamage 1};} forEach thislist; but this one doesn't work.. Share this post Link to post Share on other sites
f2k sel 164 Posted March 3, 2014 (edited) I believe Persian gave the answer in post four, I also tested it and it works fine by deleting any objects found in the array every 30 seconds. maybe !isplayer could be an issue null=this spawn {while {true} do { {if (count crew _x == 0) then {deletevehicle _x}} foreach (nearestobjects [position _this,["HMMWV_DES_EP1","MtvrSupply_DES_EP1","BTR90_HQ"],200]); sleep 30;}} Edited March 3, 2014 by F2k Sel Share this post Link to post Share on other sites
cychou 11 Posted March 3, 2014 (edited) OK thanks Persian and F2K Sel are right. I initially made the mistake to set a trigger activated by "game logic", instead of placing a game logic via the units selection menu. the solution given by persian (post n4) is working fine. :yay: Edited March 10, 2014 by cychou Share this post Link to post Share on other sites