SetActivator
From ZDoom Wiki
int SetActivator (int tid[, pointer_selector])
Usage
This changes the activator of the script to the first actor found with the specified tid.
Parameters
- tid: TID of the new activator.
- pointer_selector: The pointer of the TID to set as the new activator. (development version r3230+ only)
Pointer Values
Priority 1, player-only selectors (used if specified with a player origin):
- AAPTR_PLAYER_GETTARGET: Gets the actor under the crosshair.
- AAPTR_PLAYER_GETCONVERSATION: Gets the actor the player is speaking to.
Priority 2, any-actor selectors (used if specified with any non-null origin):
- AAPTR_TARGET
- AAPTR_MASTER
- AAPTR_TRACER
- AAPTR_FRIENDPLAYER
Priority 3, any static selectors (used if specified)
- AAPTR_PLAYER1, AAPTR_PLAYER2, AAPTR_PLAYER3, AAPTR_PLAYER4, AAPTR_PLAYER5, AAPTR_PLAYER6, AAPTR_PLAYER7, AAPTR_PLAYER8
- AAPTR_NULL
Minimum-priority
- AAPTR_DEFAULT: Returns the origin, be it null or an actor
Selectors from different levels are combined using bitwise OR. Only one selector can be specified for each priority level
Return value
1 (TRUE) if the activator exists. If there were no actors with the supplied tid, or the pointer is NULL, this function returns 0 (FALSE) and the activator is set to the world.
Examples
|
Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contibutions are greatly appreciated. |