Jump to content

EVENT scripts: Difference between revisions

m
GAMEEVENT_MEDALS now has event handling in 3.2.
m (Added a note explaining that it's now possible to get an event's result value in Zandronum 3.2.)
m (GAMEEVENT_MEDALS now has event handling in 3.2.)
Tag: Source edit
Line 38: Line 38:
*'''GAMEEVENT_CHAT''': setting the result value to zero prevents the chat message from being printed onto the screen. If the result value is non-zero, the chat message will be printed like normal.
*'''GAMEEVENT_CHAT''': setting the result value to zero prevents the chat message from being printed onto the screen. If the result value is non-zero, the chat message will be printed like normal.
* '''GAMEEVENT_ACTOR_DAMAGED''' and '''GAMEEVENT_ACTOR_ARMORDAMAGED''': changing the result value affects how much damage the actor actually takes.
* '''GAMEEVENT_ACTOR_DAMAGED''' and '''GAMEEVENT_ACTOR_ARMORDAMAGED''': changing the result value affects how much damage the actor actually takes.
*{{Devfeature|3.2|alpha}} '''GAMEEVENT_MEDALS''': setting the result value to zero prevents the player from receiving the medal that was earned.


A few things to note are:  
A few things to note are:  
Line 59: Line 60:
*AAPTR_DAMAGE_SOURCE: Accesses the "shooter" responsible for making the attack.
*AAPTR_DAMAGE_SOURCE: Accesses the "shooter" responsible for making the attack.
*AAPTR_DAMAGE_INFLICTOR: Accesses the actor directly responsible for causing damage (e.g. a barrel or projectile).
*AAPTR_DAMAGE_INFLICTOR: Accesses the actor directly responsible for causing damage (e.g. a barrel or projectile).
*AAPTR_DAMAGE_TARGET: Accesses the "victim" taking the damage. By default, this actor is already the activator of the script.
* AAPTR_DAMAGE_TARGET: Accesses the "victim" taking the damage. By default, this actor is already the activator of the script.
You may use these in ACS functions that deal with actor pointers, such as [[zdoom:IsPointerEqual|IsPointerEqual]], [[zdoom:SetActivator|SetActivator]], [[zdoom:SetPointer|SetPointer]], or [[zdoom:Warp|Warp]].
You may use these in ACS functions that deal with actor pointers, such as [[zdoom:IsPointerEqual|IsPointerEqual]], [[zdoom:SetActivator|SetActivator]], [[zdoom:SetPointer|SetPointer]], or [[zdoom:Warp|Warp]].