-
Notifications
You must be signed in to change notification settings - Fork 0
New game events
dounai_lib provide new events that wasn't exist in base game, they are meant to make things easier.
function accept_input(entindex, activator, input, param)
endCalled when a map I/O event occurs.
Can be disabled by a global switch: dounai_lib.event.accept_input.enable = false
entindex: number. Example: When player open a door, this is the door entity.
activator: number. Example: When player open a door, this is the player.
input: string. Example: Use, Press, Enable and Disable
param: string. In most cases this is empty.
// Console command
ent_fire button Press // "input" is "Press", "param" is empty
ent_fire !self AddOutput "origin 0 0 0" // "input" is "AddOutput", "param" is "origin 0 0 0"
ent_fire foo IgniteLifetime 3 // "input" is "IgniteLifetime", "param" is "3"
function cso2_throw_grenade_fixed(userid, entindex, weapon)
endCalled when player throw a grenade and the grenade is successfully spawned. This is 8 ticks late than original cso2_throw_grenade event.
WARNING: If entity_created event is disabled, this event will be force disabled!
Can be disabled by a global switch: dounai_lib.event.cso2_throw_grenade_fixed.enable = false
userid: number
entindex: number
weapon: string
function entity_created(entindex, classname)
endCalled as soon as the entity is created. Very little of the entity's properties will be initialized at this stage. (keyvalues, classname, flags, anything).
Can be disabled by a global switch: dounai_lib.event.entity_created.enable = false
entindex: number
classname: string
function player_use(userid, entity)
endCalled when the player presses use on an object.
WARNING: If accept_input event is disabled, this event will be force disabled!
Can be disabled by a global switch: dounai_lib.event.player_use.enable = false
userid: number
entity: number