Jump to content
Sign in to follow this  
Doodle

trigger activation vehicle height

Recommended Posts

Wonder if anyone can help -

I have an editor placed trigger that I need to activate only if any of an editable array of vehicles enters it - eg car1 or tank5 or helo13 etc and also only when the vehicle touches the ground The idea being the damaged car1 gets dropped on repair pad by helo13 but I dont want helo 13 to set off the trigger when it is hovering above the repair pad dropping off car1. but if helo13 LANDS on the pad then it would trigger it,

I think it might be something like "car1 in thislist OR tank5 in thislist" to count the vehilcles but not sure about the height check - I did see there was a new ARMA 3 command "touchingtheground" might be good

thanks in advance

Share this post


Link to post
Share on other sites

not 100% sure but may be something like (car1 distance triggername) > 1; I have used name in thisList; and it worked. please post the winning script. would be nice to have.

Share this post


Link to post
Share on other sites

try this.

edit- didn't notice the part about helo landing and setting trigger. so better to just check side of vehicle.

// check if vehicle is a less then 10 meters from ground and EAST side faction - just change faction to whatever you need.
{if (side _x == East && (getPosATL  (vehicle _x) select 2) < 10) then {  --your code here--  }} foreach (list base);

fyi - I got into the habbit of naming my triggers so the example above has a trigger name of "base" hence the "list base" at the end.

Edited by Nimrod_Z
  • Like 1

Share this post


Link to post
Share on other sites
try this.

edit- didn't notice the part about helo landing and setting trigger. so better to just check side of vehicle.

// check if vehicle is a less then 10 meters from ground and EAST side faction - just change faction to whatever you need.
{if (side _x == East && (getPosATL  (vehicle _x) select 2) < 10) then {  --your code here--  }} foreach (list base);

fyi - I got into the habbit of naming my triggers so the example above has a trigger name of "base" hence the "list base" at the end.

Thanks for this - not quite following in the ---your code here--- bit. Is this a list of vehicles that I want to activate the trigger ca1 car2 etc?

the vehicles that will be in the list are all "empty" editor placed vehicles - doesnt that make them "no side" so cant check for WEST?

the route would be -

helo13 flown by human players will lift damaged car2 and drop it on repair pad activates repair script. Then after a set time helo can pick up repaired empty vehicle

The only way to get the vehicle to repair pad is by helo list

Share this post


Link to post
Share on other sites
Thanks for this - not quite following in the ---your code here--- bit. Is this a list of vehicles that I want to activate the trigger ca1 car2 etc?

the vehicles that will be in the list are all "empty" editor placed vehicles - doesnt that make them "no side" so cant check for WEST?

the route would be -

helo13 flown by human players will lift damaged car2 and drop it on repair pad activates repair script. Then after a set time helo can pick up repaired empty vehicle

The only way to get the vehicle to repair pad is by helo list

the your code here is where you put your code for whatever you want that trigger to do, in this case fix a vehicle.

so basically you want this trigger to repair anything under that limit then. ok, how about

in codition field with activated by set to anyone and set trigger to repeated

{if (damage vehicle _x > 0 && (getPosATL  (vehicle _x) select 2) < 10) then {vehicle _x setDamage 0}} foreach (list base);

this is tested and does work but, triggers only check conditions once when you enter it. so for example your helo is damaged and it flys into trigger above 10 feet it wont trip trigger and you lower helo directly over trigger it still wont fire because it already checked that 1 time when you entered it and you were to high. you have to go out of trigger and re-enter it at less then 10 and it will trip repairing the vehicle.

so just a trigger alone may not be the best option for you in this case for that effect. a better solution would be a loop script that checks the radius and height you need maybe by marker position or even trigger position.

Edited by Nimrod_Z
updated code

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×