User Tools

Site Tools


modding:xml:game_lifecycle

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
modding:xml:game_lifecycle [2012/04/08 18:47] – created rpcmodding:xml:game_lifecycle [2014/10/06 20:43] – [Entering a Stargate] gpm
Line 16: Line 16:
     - <OnGlobalTopologyCreated> is called for all design types.     - <OnGlobalTopologyCreated> is called for all design types.
   - Determine the starting node.   - Determine the starting node.
-  - Create the starting system.+  - Create all systems in the game.
   - Add initial credits to the player.   - Add initial credits to the player.
   - Create the player ship.   - Create the player ship.
Line 22: Line 22:
   - gPlayer and gPlayerShip defined.   - gPlayer and gPlayerShip defined.
   - <OnGlobalUniverseCreated> is called for all design types.   - <OnGlobalUniverseCreated> is called for all design types.
 +  - <OnGlobalSystemStarted> is called for all design types.
   - <OnGlobalPlayerEnteredSystem> is called for all design types.   - <OnGlobalPlayerEnteredSystem> is called for all design types.
   - <OnPlayerEnteredSystem> is called for all objects in the system.   - <OnPlayerEnteredSystem> is called for all objects in the system.
Line 38: Line 39:
     - Ships get an <OnCreateOrders> event.     - Ships get an <OnCreateOrders> event.
   - Any stations with an <OnCreate> in their creation element get called here.   - Any stations with an <OnCreate> in their creation element get called here.
 +
 +====== Entering a Stargate ======
 +When the player enters a stargate the engine follows these steps:
 +
 +  - <OnGlobalPlayerLeftSystem> called for all types.
 +  - gPlayerShip set to Nil
 +  - The current system continues updating for a few ticks.
 +  - <OnGlobalSystemStopped> called for all types (for the old system).
 +  - The current system is changed to the new system.
 +  - <OnGlobalSystemStarted> called for all types (for the new system).
 +  - The current (new) system updates for a few ticks.
 +  - gPlayerShip is defined
 +  - <OnGlobalPlayerEnteredSystem> called for all types.
 +  - <OnPlayerEnteredSystem> called for all objects in system (and all active missions).
modding/xml/game_lifecycle.txt · Last modified: 2014/12/27 04:40 by 127.0.0.1