Ticket #20 (new developerquestion)

Opened 8 weeks ago

Last modified 8 weeks ago

Actions, Events and Hooks.

Reported by: cid Owned by:
Priority: minor Milestone: BattleCube - Alpha Release
Component: Gamecode Keywords:
Cc: Production: BattleCube

Description

Think of a list of useful hooks/events and functions for the Perl gamecodeing.

Change History

comment:1 Changed 8 weeks ago by cid

So far events:

Game(generic)
  • on_init - obvious
  • on_end
Game(server)
  • on_spawn <cn> - called just before spawning (to allow for state setup etc)
  • on_spawned <cn> - just after spawning
  • on_connect <cn>
  • on_disconnect <cn>
  • on_damage
Game(client)
  • on_connect
  • on_disconnect
  • on_pickup <entity_id> - maybe just remove this and use on_pickup in the entity class?

on_damage: need to think about abstraction techniques, e.g could change to on_interaction <type> ..., to allow for non-damage interaction types, such as medic healing, or giving someone some ammo, or even to be able to program an MORPG or something from it.

Note: See TracTickets for help on using tickets.