Difference between revisions of "Osiris/API/GameStarted"

From Divinity Engine Wiki
Jump to: navigation, search
m
Line 14: Line 14:
 
* [[Osiris/API/RegionStarted|RegionStarted]]
 
* [[Osiris/API/RegionStarted|RegionStarted]]
 
   
 
   
[[Category:Osiris Events]]
+
[[Category:Osiris Events|GameStarted]]

Revision as of 15:13, 19 December 2017

Full Definition(s)
  • event GameStarted((String)_LevelName, (INTEGER)_IsEditorMode)
Description

Thrown when a level has been loaded and is ready at both the server and client side.

Parameters
  • _LevelName: The identifier name of the level that has been loaded
  • _IsEditorMode: Indicates whether the game is run in the editor or not
Notes
  • The logic of Osiris is split into a server and a client side, even in single player mode. Some important things that run on the client side are visual effects and physics.
  • An example of something that is done only when the client side is ready, is playing the effect of the source collars on the characters in the tutorial and Fort Joy levels (since they're visual effects, and hence do not work if started when only the server side is ready)
  • See RegionStarted for an event that is thrown when the level is ready on the server side.
  • This event is also thrown when loading a savegame, so add additional logic for code that should be executed only the first time when this level is started (or trigger it from the INIT section of a story goal tied to this region instead).
See Also