Difference between revisions of "Cast Reference"

365 bytes added ,  09:33, 25 August 2016
m
→‎Examples: Casting a quest to its script.
imported>Goggle
m (→‎Examples: just another example.)
imported>Goggle
m (→‎Examples: Casting a quest to its script.)
Line 142: Line 142:
; If the alias is an actual actor, you can cast the alias to actor to with functions like [[StartCombat()]]. (Functions that expect actors to be called on them.)
; If the alias is an actual actor, you can cast the alias to actor to with functions like [[StartCombat()]]. (Functions that expect actors to be called on them.)
MyAlias.GetReference() as Actor
MyAlias.GetReference() as Actor
</source>
<br>
<source lang="papyrus">
; When needing to cast a Quest to its quest script, first make a property.
Quest property MyQuest auto
; Then use this line:
MyQuest as MyQuestScript
; Same can be done with GetOwningQuest() for objects directly attached to the Quest.
GetOwningQuest() as MyQuestScript
; When calling them, they must be placed in parenthesis.
</source>
</source>


Anonymous user