GameEvents - when are they fired?

Syrkres

Chieftain
Joined
Mar 3, 2016
Messages
95
Location
Mass
Ok, trying to understand how functions/GameEvents work.
I see when you write a function you need to add it to GameEvents.

is there a listing of
  1. What all the game events are? i.e. PlayerDoTurn
  2. how do you know when (or in what order) a game event fires (executes)?
  3. How do you know what parameters get passed in? Or how does the System know what parameters it needs to pass in?

If there is documentation, I found some on civ5, but wasn't too sure if it's what I should be reading?

Thanks
 
Ok after testing things

In Lua files when you create a function, it looks like you use GameEvents.<SOMEfunctionName>.Add(<MYfunctionName>) to add the MyFunctioName.

But where is the set of functions already part of GameEvents that you are supposed to add to (i.e. GameEvents.CityCreated.Add()?)

Thanks
 
Top Bottom