-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlua_funcs.txt
More file actions
32 lines (20 loc) · 866 Bytes
/
lua_funcs.txt
File metadata and controls
32 lines (20 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
general for ALL entities
========================
OnInit() // constructor
OnShutdown() // destructor
OnUpdate( DeltaTime ) // called per frame
// DeltaTime: elapsed time since the last update-call
OnEvent( EventId, Params) // arbitrary event (like OnActivate)
// EventId: id of the occured event (eg ScriptEvent_Activate)
// Params: parameters for the event (depends on the id)
// the following functions are NOT relevant for weapons which the player holds !!!
OnContact( Entity ) // collision with an other entity
// Entity: collided entity
OnHit( Hit ) // hit by weapon/projectile
// Hit: describes the hit (table: weapon, shooter, damage)
specialized entites
===================
weapons
-------
OnFire( Params ) // self-explanatory
// Params: describes the fire (table: pos, angles, dir, firemode, shooter, underwater)