Home   Help Search Login Register  

Author Topic: Detection Triggers??  (Read 725 times)

0 Members and 1 Guest are viewing this topic.

SFP

  • Guest
Detection Triggers??
« on: 26 Jul 2003, 00:29:05 »
Alright, what i want to do is set up a detection trigger that activates a whole bunch of stuff. The problem is, i don't know how to even set up a detection trgiger, such as what to put in the condition field or on activation, etc.
           -- Say that i want an enemy unit (enemy = east) to go from <unit1 setbehaviour "safe"> to <unit1 setunitpos "up">, since the unit always goes prone after it hears shots and such, but you can't have both at the same time and still have the soldier's gun on his back (i think). Also, after detection, i want some groups (say, group1 and group2) to move from patrol paths to  guard waypoints, which you can just do by synching the waypoints (gurad, or cycle?) to the trigger, right?
           --I guess my question is, how do you make a detection trigger actually work for all this to happen. Thanks in advance.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Detection Triggers??
« Reply #1 on: 26 Jul 2003, 00:51:04 »
There are some good trigger tutorials in the Ed Depot, particularly in the Getting Started section.    Read through those and you'll find yourself able to answer most of this question yourself.   ;)

Let's keep it simple.   Say you want your loon to go to behaviour aware when the enemy is detected.    Create your trigger.

Axis a, axis b etc:    as you like
Activation Box:     East detected by West
Condition:    this   (which is the default, just leave it alone)
On activation:     loon1 setbehaviour "aware"

If you want lots of things to happen when a trigger is fired, it is easier to write the code in a little script file and get the trigger to start the script

On activation:   [] exec "happeningscript.sqs"

To learn about script files start with snYpir's "Friendly Intro to code snippets".

To make the patrol groups you need to synchro the trigger (which must be type switch) to the cycle waypoint of the patrol.   There is a specific tute on switch triggers in the Ed Depot.

To see all this in action have a look at the Tutorial Mission.

All available in the Editors Depot.

Plenty of reviewed ArmA missions for you to play