Difference between revisions of "Cast Reference"
m
→Examples: Cleaned up syntax a bit
imported>FrankFamily |
imported>Rasikko m (→Examples: Cleaned up syntax a bit) |
||
Line 164: | Line 164: | ||
Weapon Property MyUberWeapon auto | Weapon Property MyUberWeapon auto | ||
OnTriggerEnter(ObjectReference | Event OnTriggerEnter(ObjectReference type) | ||
Weapon triggeredWeapon = (type as form) as weapon ; Cast the triggered object first to a form and then to a weapon. | Weapon triggeredWeapon = (type as form) as weapon ; Cast the triggered object first to a form and then to a weapon. | ||
Line 181: | Line 181: | ||
Keyword Property IsAnArrow auto | Keyword Property IsAnArrow auto | ||
OnTriggerEnter(ObjectReference Type) | Event OnTriggerEnter(ObjectReference Type) | ||
if(type.haskeyword(IsAnArrow)) | if(type.haskeyword(IsAnArrow)) |