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
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
On Act.:
Just let the script check the unit's height.Code:if (unit getpos select 2 > 7) then { //blah }
Triggers can't be set to a certain height afaik.
You can also just have it as a condition
condition
orCode:(unit getpos select 2 > 7)
condition
Code:this and (unit getpos select 2 > 7)
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
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
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.
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?
Try this for the condition line:
Now the trigger should only fire when there is at least one foot soldier in it.PHP Code:this && {((getPosATL _x) select 2) < 5} count thislist > 0
If you work with thislist later you still have to filter out the plane within that script.
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![]()
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\"]