Difference between revisions of "ChangeState"

From NexusWiki
Jump to: navigation, search
(Created page with '<big>'''ChangeState''' ''(state, var_set);''</big> :Changing of state in 'obj' or current state-machine. You can submit parameters in the usual way with the 'var_set' commands, ...')
 
(ilvDtENaLmgbpBZa)
Line 1: Line 1:
<big>'''ChangeState''' ''(state, var_set);''</big>
+
TYVM you've sleovd all my problems
 
+
:Changing of state in 'obj' or current state-machine. You can submit parameters in the usual way with the 'var_set' commands, that can be used by the new state's "In" rule.
+
 
+
 
+
Example 1: ''changing of state in current state-machine''
+
<pre>ChangeState("Attack", E.ship:=attacker);</pre>
+
 
+
Example 2: ''changing of state in a given state-machine (see also [[GetMachine]])''
+
<pre>GetMachine("AI"):ChangeState("Attack", E.ship:=attacker);</pre>
+
 
+
{{ScriptStructureCommands}}
+
 
+
[[Category:Script structure commands]]
+

Revision as of 15:50, 10 September 2012

TYVM you've sleovd all my problems