Difference between revisions of "Cast Reference"

1 byte added ,  09:35, 28 March 2012
m
no edit summary
imported>Kahmul
imported>Kahmul
m
Line 133: Line 133:
== Cast to different types ==
== Cast to different types ==


Casting types to different ones might be useful i.e. if you want to know the type of the object triggered with your triggerzone. But, for example, you can't cast an ObjectReference to a Weapon or compare them. In this case you can work with the "Form"-Type.
Casting types to different ones might be useful i.e. if you want to know the type of the object triggered with your triggerzone. But, for example, you can't cast an ObjectReference to a Weapon or compare them. In this case you can work with the "Form"-type.


=== Examples ===
=== Examples ===
Line 159: Line 159:


if(type.haskeyword(IsAnArrow))
if(type.haskeyword(IsAnArrow))
   ;if the object type has our keyword, do something.
   ; if the object type has our keyword, do something.
endif
endif


Anonymous user