Conditions
(Use Ctrl + F to search for keywords)
Use speed as a condition
To use the speed of a unit as a condition, use this code in the ‘Condition’ field of a trigger: speed car1 > 55; You could add a hint on activation to read “You are speeding!”
Hold at waypoint until trigger is activated
To make a unit or group hold at a waypoint, click ‘Synchronize’ and drag from the unit’s waypoint to the trigger.
This group activates trigger
To make a specific group be the one to activate a trigger, click ‘Groups’ and drag a line from the activating group to the trigger. Go back to the trigger menu and change to ‘Entire Group’, ‘Group Member’, or ‘Group Leader’ to declare who from the group activates it.
How much does unit know about this?
Every unit knows between 0% and 100% about every other unit. To utilize this, you can check how much a unit knows about another. This is useful for creating intruder alarms and such. Used as a ‘Condition’, this code will determine if Nick knows at least 50% of the information about Bob. Nick knowsabout Bob >2; (use number between 0 and 4 for knowledge level).
Is unit dead?
To check to see if a unit or object is dead, insert this code into the ‘Condition’ field: !alive Bob; The ! basically says NOT, so NOTalive Bob. This may be omitted to ask if bob is alive.
Check if engine is on
Used as a condition, this code is typed into waypoints or triggers: isEngineOn car1; To check if engine is off, type !isEngineOn car1
Is unit present inside trigger radius?
To see if a specific unit is inside a trigger, type this code into the triggers ‘Condition’ field: Bob in thislist; For multiple units use:(Bob in thislist) && (Nick in thislist); or use (Bob in thislist) or (Nick in thislist);
Is unit a human player?
To see if a unit is a human player type this as a ‘Condition’: isplayer Bob;
What is the damage level of a unit?
To check the damage level of a unit, type this into any ‘Condition’ field: getdammage Bob >0.7; This will trip the trigger if Bob’s damage is greater than 70%. It has a value from 0 to 1.
Is unit in this vehicle?
To check to see if a unit is in a specific vehicle, use this code as a ‘Condition’: Bob in car1;
Check number of units in vehicle
To make a trigger fire when a certain number of units enter car1, use this code as a trigger ‘Condition’: count crew car1 == 10; or use count crew car1 >2;
Distance between two objects/units
This code should be used as a condition. It will compare the distance between two objects and trip the trigger if it equals true. Bob distance Nick < 10; So, if Bob is within 10 meters of Nick, the trigger will trip. An = may be substituted for the < to trip when Bob’s distance to Nick is equal to 10 meters.
Check the damage level of unit/object
To compare the damage level of anything, use this code in a ‘Condition’ field: getdammage Bob >0.7; In this code, 0.7 is equal to 70% damage. If Bob is over 70% injured, the trigger will trip.
Check time of day
To use the time of day as a condition, use this code in a ‘Condition’ field: daytime >=12; 12 is 12 hours past 0000 hrs or noon. 16 would be 1600hrs or 4pm.
Thank you for taking the time to do this. 🙂