Difference between revisions of "GoTo"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Omzy
(new fose function)
 
imported>Cipscis
(Changed indentation and lebel ID - I don't think label IDs can go higher than 256)
Line 8: Line 8:
   |Type = int
   |Type = int
   }}
   }}
  |example = GoTo 1337
  |example = GoTo 1
}}
}}
==Notes==
===The Label/GoTo Loop===
===The Label/GoTo Loop===
This function can be used to create a loop when combined with [[Label]]. The following script loops the script instructions ''iterations'' times:
This function can be used to create a loop when combined with [[Label]]. The following script loops the script instructions ''iterations'' times:
  scn LoopScript
  ScriptName LoopScript
  int count
  int count
  int iterations
  int iterations
  Begin GameMode
  Begin GameMode
  Label 1337
Label 1
    ;Script instructions to loop
;Script instructions to loop
    set count to count + 1
set count to count + 1
  if count < iterations
if count < iterations
    GoTo 1337
GoTo 1
  endif
endif
  End
  End



Revision as of 22:58, 3 August 2009

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

A function added by the Fallout Script Extender.

Description

Continues processing the current script from a previously indicated label ID.

Syntax

[help]
GoTo ID:int

Example

GoTo 1

The Label/GoTo Loop

This function can be used to create a loop when combined with Label. 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