ThePlatoon.com
September 07, 2008, 12:00:30 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Look around and get acquainted to the new settings and features.
 
  Home   Forum   Help Search Calendar Login Register  
  Shop Gallery  
Pages: [1]   Go Down
  Print  
Author Topic: GR:AW SP Scripting 2  (Read 642 times)
0 Members and 1 Guest are viewing this topic.
Wolfsong
One with nature...
Administrator
Full Member
*****

Rep: 6
Offline Offline

Posts: 497
1513.00 credits

View Inventory
Send Money to Wolfsong

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

Ok. Another one.

Quote
Mission Objectives In The User Interface

NOTE: You can add as many elements as you want in these events. Everything you want to happen when the objective starts and ends should be put into these events.


Create Event To Add A Mission Objective To The GUI

[color="RoyalBlue"][/color]
Add Objective Info
[color="RoyalBlue"]- txt_is => which string entry to show as description text for objective, example "Search and destroy the mobile ADA unit. Use your C4 or other explosives to neutralize it."
- state => what you want to do with the objective?, add/remove
- mode => keep this set to 1
- start_time => when to show it?, seconds delay after event executed
Add Objective CrossCom Marker
[color="RoyalBlue"][/color]
- type => define that you're dealing with an objective
- id => name for this element inside the script, used for deactivating and changing info
- waypoint_id => which string entry to show as name tag for marker
- state => what do you want to do with the marker?, add/remove
- waypoint => x,y,z coordinates on map to place it
- mode => keep this set to 1
- start_time => when to show it?, seconds delay after event executed
[color="RoyalBlue"]
[/color]


Create Event To Update A Mission Objective On The GUI
[color="RoyalBlue"][/color]
Update Objective Info
[color="RoyalBlue"][/color]
- type => define that you're dealing with an objective
- id => define which objective you want to work with, same as id when you created it
- headline_id => which string entry to show as new headline for objective, example "Get a move on, Search and destroy ADA unit"
- txt_is => which string entry to show as new description text for objective, example "Search and destroy the mobile ADA unit. Use your C4 or other explosives to neutralize it. The ADA is on the move!"
- state => what you want to do with the objective?, add/remove, use add when updating
- mode => keep this set to 1
- start_time => when to update it?, seconds delay after event executed
[color="RoyalBlue"]
[/color]


Create Event To Remove Mission Objective From The GUI
[color="RoyalBlue"][/color]
Remove Objective CrossCom Marker
[color="RoyalBlue"][/color]
- type => define that you're dealing with an objective
- id => define which marker you want to work with, same as id when you created it
- state => what do you want to do with the marker?, add/remove
- mode => keep this set to 1
- start_time => when to remove it?, seconds delay after event executed
Remove Objective Info
[color="RoyalBlue"][/color]
- type => define that you're dealing with an objective
- id => define which objective you want to work with, same as id when you created it
- state => what do you want to do with the marker?, add/remove
Add Next Objective
[color="RoyalBlue"]
[/color]


And the clean XML code with only overview comments:

Adding A Mission Objective To The GUI
[color="RoyalBlue"]

[/color]

Update A Mission Objective On The GUI
[color="RoyalBlue"]

[/color]

Removing A Mission Objective From The GUI
[color="RoyalBlue"]


[/color]


NOTE: The creation of marker and info can all be done in one go!

[color="RoyalBlue"][/color]

But as you can see there is no id for just the marker defined, which gives that you can't just update the waypoint if you need to. It's all in one big package.
On the other hand your marker will get deleted with your info, using only one element.

[color="RoyalBlue"][/color]

So it depends on the type of objective you have which way to deal with the user interface.


The Strings
There was a few string entrys used in these scripts. These are found in the strings/mission.xml.
in our case it would be a short file like this:


[color="RoyalBlue"]






[/color]

Notice that the mission briefing text is also in this file. :wink:
Ok. Now all we need is triggers for these events... that's for next time. cool
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!