Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Excerpt |
---|
Functions for labelling objects... |
What are labels?
Section | ||||
---|---|---|---|---|
|
Which objects can be labelled?
You can label any of the Warzone Objects, with the exception of Data objects:
Section | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Notes:
- When a Game object gets destroyed its associated label is removed.
- Location objects are removed when they no longer have any labels associated with them.
- Apparently, groups can be labelled as well.
How do I create labels?
There are three ways to create labels:
- Use a map editor, like FlaME, to define and label objects (the labels are stored in labels.ini)
- Define them manually in the labels.ini file associated with a map – remember to specify the "label" property!
- Create a custom location object in a script and use addLabel() to label it
There are discussions taking place in the forums and also a wiki page that propose possible naming conventions for labels.
Are they private to my script?
No. And this is perhaps the most important thing to understand when using labels.
Labels are shared between all scripts running on the same machine, but are not syncrhonised with network peers.
This is particularly important on the game host where there are a large number of scripts running.
As such, it's recommended that any labels you create using the addLabel() function should be prefixed or suffixed with the value of 'me' to reduce the chances of other scripts overwriting them.
Are they persistent?
Labels are stored in save games, and will be restored when the save game is loaded.
Labels defined in a map (labels.ini) can be changed at runtime, by assigning those labels to some other object or removing them, and those changes will persist in save games, but the map will not be altered. So, if you start a new game, the original labels from the map will be reinstated.
Div | ||||||
---|---|---|---|---|---|---|
| ||||||
Availability
Requires:
The majority of label features were added or improved in Warzone 3.2 |
Div | ||||
---|---|---|---|---|
| ||||
ContentsJump to:
|
Include Page | ||||
---|---|---|---|---|
|