OnNpcProjectileState
onNpcProjectileState
AVAILABLE FROM UPDATE 0.1.5
This event is available in G1R:MP 0.1.5 and later. The contract below includes the compatibility guarantees introduced in that update.
Reports ranged/spell subsystem state transitions for an NPC.
Availability
This event is available in server-side scripts.
Callback signature
function(npcId, domain, phase, result, rejectReason)
Parameters
| Name | Type | Description |
|---|---|---|
npcId |
int |
NPC owner. |
domain |
string |
ranged or magic. |
phase |
int |
Numeric phase for that domain. |
result |
int |
Numeric result for that domain. |
rejectReason |
int |
Numeric rejection code for that domain. |
Notes
- Listen with addEventHandler(eventName, root, handler). Server observation/event, not client authority.
- Use domain-specific values listed in NPC scripting#Combat status. This does not invoke player-only cast/equipment events.
- See NPC scripting and Update 0.1.5.