Get your own free workspace
View
 

ActorInTrigger

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

 

ActorInTrigger

Usage:

                ActorInTrigger(Actor, Trigger)

Description:

The ActorInTrigger command returns 1 if the specified actor is inside the volume of the specified trigger, or 0 if outside. Trigger IDs are always the same once the trigger is placed, and can be found as the first parameter passed to a trigger script. See the Parameter command for how to extract this value.

Example:

                Function Main()
                        // Give actor 10 health if within the volume of trigger 3
                        Ac = Actor()
                        If (ActorInTrigger(Ac, 3))
                                SetAttribute(Ac, "Health", Attribute(Ac, "Health") + 10)
                        EndIf

                        Return()
                End Function

Comments (0)

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