ThePlatoon.com
August 20, 2008, 11:28:19 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: WELCOME! As you can see we have changed forum systems, for good I hope.
 
  Home   Forum   Help Search Calendar Login Register  
  Shop Gallery  
Pages: [1]   Go Down
  Print  
Author Topic: GR:AW SP Scripting 3  (Read 581 times)
0 Members and 1 Guest are viewing this topic.
Wolfsong
One with nature...
Administrator
Full Member
*****

Rep: 6
Offline Offline

Posts: 495
1473.00 credits

View Inventory
Send Money to Wolfsong

75672554 WolfsongSwe@Hotmail.com
View Profile WWW
« on: November 29, 2006, 08:42:15 AM »

And another one. cool

Quote

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.
Logged

---===[ STAFF ]===---
Technical Artist at Grin Inc.
Current Projects:
- Bionic Commando (PC/PS3/360)
- Bionic Commando - Rearmed (PC/PSN/XBL)
- Wanted (PC/PS3/360)
- "Secret Project"
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
SMF Theme © Gaia
Valid XHTML 1.0! Valid CSS!