Home   Help Search Login Register  

Author Topic: How to make a trigger work at a certen hight?  (Read 1850 times)

0 Members and 1 Guest are viewing this topic.

R.I.P-omega-

  • Guest
How to make a trigger work at a certen hight?
« on: 17 Sep 2005, 15:34:05 »
Hi im makeing a mission and there is a point in the mission where the player needs to get on a scaffold and shoot from there, is there a way to make a trigger wrok from a certen hight?

for a instance if ill be under the trriger nothing will happen or if ill be on top of a triiger nothing will happen ethir only if im at the same hight of the trriger....

PS- mind my english  :)


Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:How to make a trigger work at a certen hight?
« Reply #1 on: 17 Sep 2005, 15:53:48 »
AFAIK triggers are not height specific, in other words they work whatever your height, as long as the subject enters the area covered by the trigger.

Edit:  Ummmmm......think I might have misunderstood the question..........never mind  ;D


Planck
« Last Edit: 17 Sep 2005, 17:20:51 by Planck »
I know a little about a lot, and a lot about a little.

bored_onion

  • Guest
Re:How to make a trigger work at a certen hight?
« Reply #2 on: 17 Sep 2005, 16:14:08 »
if its only for the player then put this in the condition field of the trigger (which is activated by player present):

Code: [Select]
this AND (getpos player select 2)==8
this should do it. it assumes that the player is called "player" and that the height you are after is about 8 (you can change this with testing). syntax not guaranteed.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:How to make a trigger work at a certen hight?
« Reply #3 on: 17 Sep 2005, 16:30:29 »
Don't use ==.     Use <= or >=, possibly in combination depending on exactly what you want.
Plenty of reviewed ArmA missions for you to play

bored_onion

  • Guest
Re:How to make a trigger work at a certen hight?
« Reply #4 on: 17 Sep 2005, 17:01:54 »
good point. otherwise you have to be at exactly 8. make it variable between 7 and 9 rather than a flat 8.

so:

Code: [Select]
this AND (getpos player select 2)<= 9 AND (getpos player select 2)>= 7
i think
« Last Edit: 17 Sep 2005, 17:03:06 by bored_onion »

R.I.P-omega-

  • Guest
Re:How to make a trigger work at a certen hight?
« Reply #5 on: 17 Sep 2005, 20:02:46 »
WoW guys you dont know how much you have helped me :D

BIIIIIG THX!

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
How to make a trigger work at a certain height (2)
« Reply #6 on: 17 Sep 2005, 21:27:40 »
Addendum to:
http://www.ofpec.com/yabbse/index.php?board=6;action=display;threadid=25605

Take care with select 2 if the unit is in or over a building.  The distance then is measured from the unit down to the nearest usable floor.  So for example a unit on the top floor of a three floor building will have a getPos select 2 value of close to zero, just as it would if it was on the middle floor or the ground floor.

I will leave this open a little while before solving it in case there other comments.

Kyle Sarnik

  • Guest
Re:How to make a trigger work at a certain height (2)
« Reply #7 on: 18 Sep 2005, 02:25:42 »
Yea I was gonna suggest this but he hit the solve button before he actualy solved it... If a unit is on a building or scaffold, the z pos (getpos unit select 2) will register as 0, so you need to use a different method such as distance.

R.I.P-omega-

  • Guest
Re:How to make a trigger work at a certain height (2)
« Reply #8 on: 18 Sep 2005, 22:51:38 »
yea sorry for tha misstake i did :P i tryed it out and the trriger dosent work while im on the scaffold.

PS- shold i unsolve the topic or contunue posting on this one?


I merged this topic with the original topic and unsolved the original.......Planck
« Last Edit: 18 Sep 2005, 23:08:11 by Planck »

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:How to make a trigger work at a certen hight?
« Reply #9 on: 18 Sep 2005, 23:12:05 »
To do this I placed a game logic high over the building (1000 m) and had a trigger covering the building.  I grouped the trigger with the player and had inthe condition field:

this and (player distance gameLogicName < 999.9)

Play with the last number to get it to fire on the correct floor.
« Last Edit: 22 Sep 2005, 18:12:11 by THobson »

R.I.P-omega-

  • Guest
Re:How to make a trigger work at a certen hight?
« Reply #10 on: 21 Sep 2005, 19:20:55 »
Quote
I grouped the trigger with the player


how do i do that?
« Last Edit: 24 Sep 2005, 13:59:49 by bedges »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:How to make a trigger work at a certen hight?
« Reply #11 on: 21 Sep 2005, 23:16:53 »
Click on Groups F2 at the top of hte Mission Editor Screen.   Click and hold on the trigger, then drag and drop a thin light blue line on to the group leader.
Plenty of reviewed ArmA missions for you to play

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:How to make a trigger work at a certen hight?
« Reply #12 on: 22 Sep 2005, 03:45:15 »
be sure to check the activation conditions afterwards (the east/west present stuff) as they will change when grouped

R.I.P-omega-

  • Guest
Re:How to make a trigger work at a certen hight?
« Reply #13 on: 23 Sep 2005, 15:44:48 »
Quote
To do this I placed a game logic high over the building (1000 m) and had a trigger covering the building.  I grouped the trigger with the player and had inthe condition field:

this and (player distance gameLogicName < 999.9)

Play with the last number to get it to fire on the correct floor.

didnt work..... i did exactly what you said and still it didnt work :(
« Last Edit: 23 Sep 2005, 15:45:44 by R.I.P-omega- »

Offline Pilot

  • Contributing Member
  • **
Re:How to make a trigger work at a certen hight?
« Reply #14 on: 23 Sep 2005, 16:12:04 »
Did you set the height of the GameLogic?  To to this you will need to put the following code in the init field of the GameLogic:
this setpos [(getpos this select 0), (getpos this select 1), 1000]

-Student Pilot