And another one.
Triggers
General Triggers(Users) Syntax
[color="RoyalBlue"][/color]
General Info About Group_ID
[color="RoyalBlue"]"friendly1" [/color]=> mitchell/server
[color="RoyalBlue"]"friendly2"[/color] => kirkland
[color="RoyalBlue"]"friendly3"[/color] => allen
[color="RoyalBlue"]"friendly4"[/color] => brown
[color="RoyalBlue"]"mp_players"[/color] => all players in MP
[color="RoyalBlue"]"friendly" or "players"[/color] => all ghosts SP/MP
or any group_id defined for a human/humans in the map editor
Trigger Conditions Short List
- UnitInArea => Unit In Zone Trigger
- Vehicle => Destroyed Vehicle Trigger
- UnitDestroyed => Destroyed Prop Or Static Trigger
- EnemyGroup => Human Killed Trigger (not just for enemies wink.gif )
- HeliCleared => Group Cleared Helicopter Trigger
- TransportCleared => Group Cleared Ground Vehicle Trigger
- TeamInTransport => Group In Ground Vehicle Trigger
- TeamMemberJoined => There Is One More...
Trigger Conditions Description List
----------------------------------------------------
Unit In Zone Trigger (as described in the first tutorial)
[color="RoyalBlue"]
[/color]
- type => define that it's a unit in area trigger
- area => which defined area_group?
[color="RoyalBlue"][/color]
- name => which event to run if condition is true
[color="RoyalBlue"][/color]
Clean Code:
[color="RoyalBlue"]
[/color]
----------------------------------------------------
Many Units In Different Zone/Zones Trigger
[color="RoyalBlue"]
[/color]
- type => define that it's a unit in area trigger
- area => which first defined area_group?
[color="RoyalBlue"][/color]
- type => define that it's a unit in area trigger
- area => which second defined area_group?
[color="RoyalBlue"][/color]
- type => define that it's a unit in area trigger
- area => which third defined area_group?
[color="RoyalBlue"][/color]
- name => which event to run if condition is true
[color="RoyalBlue"]
[/color]
Clean Code:
[color="RoyalBlue"]
[/color]
NOTE: For all triggers that doesn't have a closing tag you can just add them after each other. In this case three area checks.
----------------------------------------------------
Destroyed Vehicle Trigger
[color="RoyalBlue"]
[/color]
- type => define that it's vehicle based trigger, if the defined vehicle is destroyed the condition is true
[color="RoyalBlue"][/color]
- id => which vehicle is the trigger for?, use vehicle_id set for the vehicle in the map editor
[color="RoyalBlue"]
[/color]
- name => which event to run if condition is true
[color="RoyalBlue"][/color]
Clean Code:
[color="RoyalBlue"]
[/color]
----------------------------------------------------
Destroyed Two Vehicles Trigger
[color="RoyalBlue"]
[/color]
- type => define that it's vehicle based trigger, if the defined vehicle is destroyed the condition is true
[color="RoyalBlue"][/color]
- id => which is the first vehicle?, use vehicle_id set for the vehicle in the map editor
[color="RoyalBlue"][/color]
- id => which is the second vehicle?, use vehicle_id set for the vehicle in the map editor
[color="RoyalBlue"]
[/color]
- name => which event to run if both the above condition are true
[color="RoyalBlue"][/color]
Clean Code:
[color="RoyalBlue"]
[/color]
NOTE: For all triggers that have a closing tag you can add any number of the required input as you want. In this case two vehicles.
----------------------------------------------------
Destroyed Prop Or Static Trigger
[color="RoyalBlue"]
[/color]
- type => define that it's a unit destroyed trigger (props and statics are called units in world.xml)
- id => which prop or static is the trigger for?, use name_id set for the prop or static in the map editor
[color="RoyalBlue"][/color]
- name => which event to run if the above condition is true
[color="RoyalBlue"][/color]
Clean Code:
[color="RoyalBlue"]
[/color]
----------------------------------------------------
Human Killed Trigger
[color="RoyalBlue"]
[/color]
- type => define that it's group kill trigger
- name => name of trigger (use same as group_id for which the trigger concerns)
[color="RoyalBlue"][/color]
- group_id => which group is the trigger for? (see first part of tutorial)
- condition => how many has to be killed? Any number, or just "all" if you want that
[color="RoyalBlue"]
[/color]
- name => which event to run if the above condition is true
[color="RoyalBlue"][/color]
Clean Code:
[color="RoyalBlue"]
[/color]
----------------------------------------------------
Group Cleared Helicopter Trigger
[color="RoyalBlue"]
[/color]
- type => define that it's a cleared helicopter trigger
- vehicle_id => which helicopter does it concern?, use vehicle_id set for the vehicle in the map editor
- group_id => who has to be clear? (see first part of tutorial)
[color="RoyalBlue"][/color]
- name => which event to run if the above condition is true
[color="RoyalBlue"][/color]
Clean Code:
[color="RoyalBlue"]
[/color]
----------------------------------------------------
Group Cleared Ground Vehicle Trigger
[color="RoyalBlue"]
[/color]
- type => define that it's a team out of vehicle trigger
- vehicle_id => which vehicle doea it concern?, use vehicle_id set for the vehicle in the map editor
- group_id => who has to be outside? (see first part of tutorial)
[color="RoyalBlue"][/color]
- name => which event to run if the above condition is true
[color="RoyalBlue"][/color]
Clean Code:
[color="RoyalBlue"]
[/color]
----------------------------------------------------
Group In Ground Vehicle Trigger
[color="RoyalBlue"]
[/color]
- type => define that it's a team in vehicle trigger
- vehicle_id => which vehicle doea it concern?, use vehicle_id set for the vehicle in the map editor
- group_id => who has to be inside? (see first part of tutorial)
[color="RoyalBlue"][/color]
- name => which event to run if the above condition is true
[color="RoyalBlue"][/color]
Clean Code:
[color="RoyalBlue"]
[/color]
----------------------------------------------------
There Is One More...
[color="RoyalBlue"]
[/color]
- type => define check if another member has been added to the team
- group_id => to which group? (see first part of tutorial)
- condition => ??
[color="RoyalBlue"][/color]
- name => which event to run if the above condition is true
[color="RoyalBlue"][/color]
Clean Code:
[color="RoyalBlue"]
[/color]
NOTE: This is used together with some special elements in the into mission only:
[color="RoyalBlue"]
[/color]
----------------------------------------------------
Examples On Combining Different Trigger Types
[color="RoyalBlue"]
[/color]
NOTE: All you have to do is line them up one after the other. Just remember to close the triggers that require those tags.
----------------------------------------------------
Solution If You Don't Want To Allow Any Casualties
Check If Kirkland Is Dead
[color="RoyalBlue"]
[/color]
Check If Allen Is Dead
[color="RoyalBlue"]
[/color]
Check If Brown Is Dead
[color="RoyalBlue"]
[/color]
If Anyone Is Dead, End Game
[color="RoyalBlue"]
[/color]
It should get all you scripters out there going a long long way. All that is left are all the different elements and also the scripts for the fancy addons like insertions, compositions and such. That will be next.