home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2005 January / Gamestar_69_2005-01_dvd.iso / Dema / theprojectv1-0.exe / FCData / Scripts.pak / Scripts / lua_funcs.txt < prev    next >
Encoding:
Text File  |  2004-07-21  |  897 b   |  32 lines

  1. general for ALL entities
  2. ========================
  3.  
  4. OnInit()            // constructor
  5.  
  6. OnShutdown()            // destructor
  7.  
  8. OnUpdate( DeltaTime )        // called per frame
  9.                 //    DeltaTime: elapsed time since the last update-call
  10.  
  11. OnEvent( EventId, Params)    // arbitrary event (like OnActivate)
  12.                 //    EventId: id of the occured event (eg ScriptEvent_Activate)
  13.                 //    Params: parameters for the event (depends on the id)
  14.  
  15. // the following functions are NOT relevant for weapons which the player holds !!!
  16.  
  17. OnContact( Entity )        // collision with an other entity
  18.                 //    Entity: collided entity
  19.  
  20. OnHit( Hit )            // hit by weapon/projectile
  21.                 //    Hit: describes the hit (table: weapon, shooter, damage)
  22.  
  23.  
  24.  
  25. specialized entites
  26. ===================
  27.  
  28. weapons
  29. -------
  30.  
  31. OnFire( Params )        // self-explanatory
  32.                 //    Params: describes the fire (table: pos, angles, dir, firemode, shooter, underwater)