Difference between revisions of "Label"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Cipscis
(→‎External Links: Moved link to cipscis.com to new section; added link to FOSE documentation)
imported>Geckbot
(Automated import of articles)
Line 1: Line 1:
'''Label'''
{{Function
{{Function
  |origin = FOSE1
  |origin = FOSE1
  |summary = Creates a label in a script, allowing this location to be referred to by the [[GoTo]] function.
  |summary = Defines a labeled position in a script which subsequent calls to Goto can use to create loops. The label must be defined before Goto is called.
  |name = Label
  |name = Label
|returnType = void
  |arguments =  
  |arguments =  
   {{FunctionArgument
   {{FunctionArgument
   |Name = ID
   |Name = labelID
   |Type = int
   |Type = int
  |Value = 0 to 255
   }}
   }}
|example = Label 1
}}
}}
==Notes==
[[Category:Functions_(FOSE)]]
===The Label/GoTo Loop===
This function can be used to create a loop when combined with [[GoTo]]. The following script loops the script instructions ''iterations'' times:
ScriptName LoopScript
int count
int iterations
Begin GameMode
Label 1
;Script instructions to loop
set count to count + 1
if count < iterations
GoTo 1
endif
End
 
==See Also==
*[[GoTo]]
 
==External Links==
*[http://www.cipscis.com/fallout/tutorials/loops.aspx Loops]
*[http://fose.silverlock.org/fose_command_doc.html#Label FOSE Documentation]
 
[[Category:Functions]]
[[Category:Functions (FOSE)]]

Revision as of 12:22, 27 July 2010

Label

< [[::Category:Functions|Category:Functions]]

A function added by the Fallout Script Extender.

Description

Defines a labeled position in a script which subsequent calls to Goto can use to create loops. The label must be defined before Goto is called.

Syntax

[help]
Label labelID:int