Level Editor/Scripting/Zones: Difference between revisions
TeamSpecBot (talk | contribs) Level Editor: zones scripting guide |
TeamSpecBot (talk | contribs) American spelling |
||
| Line 17: | Line 17: | ||
* Its '''label''', exactly the name you typed. [[Level Editor/Scripting/Reference/GamemodeServerApi#zone_label|api.zone_label]]<code>(zone)</code> returns it. | * Its '''label''', exactly the name you typed. [[Level Editor/Scripting/Reference/GamemodeServerApi#zone_label|api.zone_label]]<code>(zone)</code> returns it. | ||
'''Compare labels, not keys.''' <code>zone == &"Capture Point"</code> only ever matches the first zone with that name; <code>api.zone_label(zone) == &"Capture Point"</code> matches all of them. Tell same-named zones apart with [[Level Editor/Scripting/Reference/GamemodeServerApi#zone_team|api.zone_team]], and find them all with [[Level Editor/Scripting/Reference/GamemodeServerApi# | '''Compare labels, not keys.''' <code>zone == &"Capture Point"</code> only ever matches the first zone with that name; <code>api.zone_label(zone) == &"Capture Point"</code> matches all of them. Tell same-named zones apart with [[Level Editor/Scripting/Reference/GamemodeServerApi#zone_team|api.zone_team]], and find them all with [[Level Editor/Scripting/Reference/GamemodeServerApi#zones_labeled|api.zones_labeled]]. Names are matched exactly, including capitals and spaces. | ||
== Zone hooks == | == Zone hooks == | ||