Home   Help Search Login Register  

Author Topic: Simple Syntax  (Read 460 times)

0 Members and 1 Guest are viewing this topic.

BrAinOfJ

  • Guest
Simple Syntax
« on: 02 Dec 2003, 17:10:26 »
I asked before about if then else statements, this is a continuation of that, but different enough to justify a new subject.

What is the syntax that is to be used in a triggers activation field for an if, then statement.
Please answer by showing the relationship to the following....

IF goon=alive THEN do nextwaypoint

or better still

If west=present AND east=not present THEN do nextwaypoint

Im finding the tutes helpful, but some of the things i need the game to do, arent explained there...
« Last Edit: 02 Dec 2003, 17:11:58 by BrAinOfJ »

gundernak

  • Guest
Re:Simple Syntax
« Reply #1 on: 02 Dec 2003, 17:22:27 »
 ;)funny you have again the same question below answered...

trigger help (easy)  by sith

gundernak

  • Guest
Re:Simple Syntax
« Reply #2 on: 02 Dec 2003, 17:32:57 »
otherwise, from unofficial command ref:

Command :
LockWP
 
Description :
Allows /disallows the specified unit from moving to it s next waypoint.
 
Syntax :
unitName LockWP TorF

unitName is the name of the unit to move

TorF
TRUE locks the waypoint so the unit will not move to it.
FALSE  unlocks the waypoint so the unit will move to it.
 
Returns :
N/A
 
Example :
aP LockWP false
---------------------------------------

It means you can use this command in a trigger 'on activation field'.

units present or not present - this you can set in a trigger menu

if you want more specified conditions you will type to condition field...

alive syntax: 'alive unitname'

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Simple Syntax
« Reply #3 on: 02 Dec 2003, 17:57:42 »
Triggers ARE an if-then statement.   If the Activation box/condition line is true, then do what's in the on activation box.    

You can use conditions in waypoints too - the group will not go on to the next waypoint till the condition is met.    The on activation field of a waypoint is carried out when the group arrives at the waypoint, if I remember rightly.

Triggers can be synchronised with waypoints to control the groups progression.       Make sure you understand what a switch trigger is and how it works - there are tutes on this.

Example of an ordinary trigger and WP

trigger
=====
Activation box:  east present
Condition:  this and alive loon1
On activation:   grp1Move=true

WP
==
Condition:   grp1Move


The group will stay at the waypoint till the variable is true, then they will move onto the next waypoint.

For east present and west not present the simplest way is two triggers covering the same area.   You could do it with one but then you have to start messing with the array returned by the trigger and for such a simple thing its not worth the trouble.   Use variables to communicate information from one trigger to the other.
Plenty of reviewed ArmA missions for you to play