Calling reference

From GECK
(Redirected from Calling)
Jump to: navigation, search

Some functions may be called on a reference, and apply their procedure to them. Beware that a ref variable does not necessarily store a reference- in the GECK it may also store a base form. For example:

ref MyRefVar
set MyRefVar to WeapNV9mmPistol ; Base form!

if MyRefVar.IsQuestItem ; !INVALID for base forms!
..
if IsQuestItem MyRefVar ; Valid for base forms
..

If a script is called with a calling reference, then every function in that script that does not have an explicit calling reference will be implicitly called by that script's calling reference.

A script's implicit calling reference can be retrieved via GetSelf / GetSelfAlt.