User Tools

Site Tools


cw4:programming_notes

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
cw4:programming_notes [2023/06/10 19:56] – move from :awake to here, formatting improvements Grabzcw4:programming_notes [2025/02/14 14:57] (current) – external edit 127.0.0.1
Line 44: Line 44:
 A critical distinction exists between scripts attached to units and scripts scheduled to run during Pre- or Post- phases of Global Control.  A critical distinction exists between scripts attached to units and scripts scheduled to run during Pre- or Post- phases of Global Control. 
  
-Functionally, the '':Awake'' function in pre- or Post Global Control phases are equivalent to ''[[func_once|:Once]]'' function. It is not executed until the appropriate moment in processing (before or after all units are processed for every game tick). This may cause execution of '':Awake'' functions to appear in the incorrect order, where each unit will execute it's '':Awake'' function as it is instantiated during map load (either initial load or load from a save, there is no difference), and the '':Awake'' in a Global Control script will execute at the beginning or end, respectively, of a game tick.+Functionally, the '':Awake'' function in pre- or Post Global Control phases are equivalent to the '':Once'' function. It is not executed until the appropriate moment in processing (before or after all units are processed for every game tick). This may cause execution of '':Awake'' functions to appear in the incorrect order, where each unit will execute it's '':Awake'' function as it is instantiated during map load (either initial load or load from a save, there is no difference), and the '':Awake'' in a Global Control script will execute at the beginning or end, respectively, of a game tick.
  
cw4/programming_notes.1686427004.txt.gz · Last modified: 2025/02/14 14:56 (external edit)