Difference between revisions of "Scripting Tutorial: Basic Scripting Knowledge"
Scripting Tutorial: Basic Scripting Knowledge (edit)
Revision as of 04:29, 26 May 2006
, 04:29, 26 May 2006→3. [[:Category:References|References]] and [[:Category:Variables|Variables]]
imported>JOG |
imported>JOG |
||
|
== 3. [[:Category:References|References]] and [[:Category:Variables|Variables]] ==
Functions affect the "calling object" (That on which the script is running) by default, but you can redirect them to another object by using the object's [[:Category:References|reference]]. When you want a script to affect the player for example, use the player's reference ("Player") and a '.' to redirect the function-call to the player instead of the calling object.
player.additem gold_001 100
short addgold
| |||