Jump to content
Sign in to follow this  
chimaerazone

Setting Trigger Height

Recommended Posts

So I am making a mission where you enter a town and search around for a hostage. I have the hostage on the top floor of a building, the height of the floor is 11. The issue is when I walk into the building I hit the trigger on the bottom floor, the hostage joins my group and the guards on the floor kill him. I want the trigger to activate whenever I am on the same floor as him, not below him. Is there anyway to do this?

On my trigger:

[H1] join p1; h1 setcaptive false; h1 enableAI "move";

On my hostage:

removeallweapons this; removeallitems this; removeheadgear this; removevest this; this unassignitem "nvgoggles"; this removeitem "nvgoggles"; this disableai "move"; this setcaptive true;

Edited by ChimaeraZone

Share this post


Link to post
Share on other sites

You have to adjust the trigger condition manually - triggers don't check height.

Something like the following in your condition block in the trigger

this && ({ (getPosATL _x) select 2 >= 11 } count thislist) > 0

- Triggers pass the list of objects that would activate the trigger as an array in the variable thislist

- You can count the elements of an array that satisfy some condition

I can't test it out at the moment, but I think that should work.

Share this post


Link to post
Share on other sites

This is from a repair trigger which only works for helicopters:

("Helicopter" countType thislist  > 0) && count (thislist unitsBelowHeight 1) > 0

Share this post


Link to post
Share on other sites

If this is to make the hostage join the player group, might I suggest adding an action to him to trigger it instead? :)

Share this post


Link to post
Share on other sites
You have to adjust the trigger condition manually - triggers don't check height.

Something like the following in your condition block in the trigger

this && ({ (getPosATL _x) select 2 >= 11 } count thislist) > 0

- Triggers pass the list of objects that would activate the trigger as an array in the variable thislist

- You can count the elements of an array that satisfy some condition

I can't test it out at the moment, but I think that should work.

Thank you I will test it out and tell you if it works.

I just tested it and it works.

If this is to make the hostage join the player group, might I suggest adding an action to him to trigger it instead? :)

Never thought of that, how do I go about that?

Edited by ChimaeraZone

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  

×