Get your own free workspace
View
 

ContextActor

Page history last edited by Gamemaster 3 years, 11 months ago

 

ContextActor

Usage:

                ContextActor()

Description:

The ContextActor command returns a handle to the context actor of the script. An actor handle is required for use in many commands such as Output. Usually the actor whose handle is returned is an NPC. For example: if the script is executed by a player right-clicking an NPC, Actor will return the handle of the player actor, and ContextActor will return the handle of the NPC actor.

Example:

                Function Main()
                        NPC = ContextActor()
                        Strength = Attribute(NPC, "Strength")
                        Output(Actor(), Strength) // This will display the NPCs speed
                        Return()
                End Function

Comments (0)

You don't have permission to comment on this page.