Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: set height of trigger

  1. #1

    set height of trigger

    say i want the trigger zone on the 3rd level of a building - how to set it for a height. I can do it for objects but not sure about the trigger.

    thanx

  2. #2
    On Act.:
    Code:
    if (unit getpos select 2 > 7) then
    {
      //blah
    }
    Just let the script check the unit's height.
    Triggers can't be set to a certain height afaik.

  3. #3
    You can also just have it as a condition

    condition
    Code:
    (unit getpos select 2 > 7)
    or
    condition
    Code:
    this and (unit getpos select 2 > 7)

  4. #4
    Don't use getPos. It will return height of 0 for units on any floor of the building. Try this instead:
    Code:
    (unit modelToWorld [0,0,0]) select 2
    VBS2 Designer

    Quote Originally Posted by Armored_Sheep View Post
    I like to call Arma a sandbox game that works pretty much like LEGO - you buy it not just because you want to have a nice car from the main picture on its box, do you?

  5. #5
    Quote Originally Posted by gobbo View Post
    Triggers can't be set to a certain height afaik.
    They can actually, but... I've only got it to affect sound effects set in the trigger (in the effects tab). I use if for "dynamic volume control of sound effects", such as wind sound. The list the trigger area generates (at least circular ones) seems to be infinite cylinders rather than spheres, at least in the upward direction. I haven't checked if moving a circular trigger up still lists things below it.
    Regards
    Carl Gustaffa - left this game due becoming Steam Exclusive

  6. #6
    I assume you want to check if a unit which fits certain criteria is on 3rd floor in a building for example?

    I don't think you can do what you want that way by moving the trigger.

    Instead you can do this. Set the corresponding triggerside and condition, eg. ANYBODY and PRESENT for example. Then you can do something like this:

    Condition: found = false; {if (getPosATL _x select 2 > 14.0) then {found = true;};} forEach thisList; found;

    On Act: hint "On 3rd floor";

    You of course will have to find the correct height of the floor above terrain level (ATL). I don't think the loop will cause much performance issue since thisList is empty when noone is there, which means theres nothing to check. If there is something then it only has to do it once, assuming you've not set it to repeating.

  7. #7
    Here's a kind of similar question. I have a blufor plane flying through a trigger that I don't want to trip it. But I have blufor units on the ground that I do want to trip it.
    Is there a way to get the trigger to ignore the plane?

  8. #8
    Try this for the condition line:
    PHP Code:
    this && {((getPosATL _xselect 2) < 5count thislist 
    Now the trigger should only fire when there is at least one foot soldier in it.
    If you work with thislist later you still have to filter out the plane within that script.

  9. #9
    Thanks Deadfast. That worked a treat on getting the infantry triggers to only trip when ground units went into them and nothing airbourne.

    And as for the last trigger that the ground units wouldn't encounter anyway, I just grouped that one to the specific unit (a helicopter) that had to trigger it.

    So now the plane can fly through all the triggers and it doesn't set off any of them.

    Sorted

  10. #10
    Is there a way to tweek this into a script or trigger so that it only fires for the players above 50 altitude ?

    Code:
    Condition: found = false; {if (getPosATL _x select 2 > 50.0) then {found = true;};} forEach thisList; found;
    Code:
    On Act: hint "Someone detected above 50";

    A script would be great. If it had to be a trigger I could just make it as big as the map.
    Thank you in advance.
    "http://www.rocksraiders.com\"]

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •