Home   Help Search Login Register  

Author Topic: Trigger to detect...  (Read 991 times)

0 Members and 1 Guest are viewing this topic.

duexmad

  • Guest
Trigger to detect...
« on: 13 Mar 2003, 02:43:08 »
Hello all,

I am trying a make a map where a soldier is parachuted and needs to land at a DZ (Drop Zone).

Now the 'problem' is this;

The Trigger  will go off, if a 'west' unit (i.e. soldier under canopy) hits it while in the air. (even with the F2 mouse drag)

I need a trigger to detect it once the soldier in on the ground and not in the air.

Is that possible???

Thanks in advance.

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Trigger to detect...
« Reply #1 on: 13 Mar 2003, 08:55:48 »
hmm..

experiment with the canstand commad and if that doesn't work

_soldier = _this select 0
#height
_height = getpos _soldier select 2
?_height < 2: goto "activate"
~1
goto "height"
#activate
type here a condition to activate the trigger
exit

activate the script by typing [soldiername] exec "scriptname.sqs"
Not all is lost.

duexmad

  • Guest
Re:Trigger to detect...
« Reply #2 on: 13 Mar 2003, 17:32:06 »
Dear Artak,

Thank you!
I will check it out and post the results here ASAP.

Also, at the '#activation'

Could I type this in?

_vehicle == player

(To detect once the player is out of the chopper)

Thanks again!


Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Trigger to detect...
« Reply #3 on: 13 Mar 2003, 18:17:26 »

duexmad

  • Guest
Re:Trigger to detect...
« Reply #4 on: 14 Mar 2003, 04:50:47 »
Tried that , Armstrong  :D
Code: [Select]
? (getPos this select 2 < 40) and (getPos this select 2 > 25):trigger1=true

But, gave me some weird error message (not so 'weird for you guys').

basically it is saying that the '?' is  "Invalid Number in expression"

'|#|? (getPos this select 2 < 40) and (getPos this select 2 > 25):trigger1=true :Error Invalid Number in expression

I have placed that line on the 'Condition' and on the 'On Activation' no luck.
What am I doing wrong? I know it has to be something with the '?' mark (?)

 :-\

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:Trigger to detect...
« Reply #5 on: 14 Mar 2003, 07:38:22 »
You can't have ? in a trigger.. *cough*

The triggers condition line has a 'build-in' ?-mark in it.
« Last Edit: 14 Mar 2003, 07:41:37 by Artak »
Not all is lost.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Trigger to detect...
« Reply #6 on: 14 Mar 2003, 08:06:58 »
Well, Armstrong suggested that you don't have to script
but the command he gave you does only work in scripts  :)

If you want to use this in a trigger, you need to cut it into
two parts:

condition:
(getPos soldier select 2 < 40) and (getPos soldier select 2 > 25)

onActivation: trigger1=true

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

duexmad

  • Guest
Re:Trigger to detect...
« Reply #7 on: 26 Mar 2003, 23:39:18 »
Thanks guys got it figured out.

Thanks again
 ::)


LinCafe

  • Guest
Re:Trigger to detect...
« Reply #8 on: 27 Mar 2003, 11:50:31 »
just put this In the CONDITION field of the trigger:

This AND (getpos UnitName select 2 < N)

Then the trigger will fire when the unit is present, and "N" meters or less above the ground.

Hope this helps you