User Tools

Site Tools


4rpl:commands:func_awake

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
4rpl:commands:func_awake [2021/01/14 10:28] virgilw4rpl:commands:func_awake [2023/06/10 15:53] (current) Grabz
Line 1: Line 1:
 ~~NOTOC~~ ~~NOTOC~~
-<=[[4rpl:start| Index]]+<= [[4rpl:start|Index]]
  
-This callback is called whenever a unit with an attached script is created. This can happen at game load, or during a game when a unit is created with CreateUnit.+====== :Awake ====== 
 + 
 +===== Description ===== 
 + 
 +'':Awake''  is called whenever a unit with this script attached is created. This can happen at game load, or during a game when a unit is created with [[4rpl:commands:createunit|CreateUnit]]. 
 + 
 +Please refer to [[cw4:Programming Notes]] for an in-depth discussion and comparison between ''[[func_Once| :Once]]'', ''[[func_GameLoaded|:GameLoaded]]'', and ''[[func_Awake|:Awake]]''. 
 + 
 +===== Examples =====
  
-=== Examples === 
 <code 4rpl> <code 4rpl>
 :Awake :Awake
-   Trace("I Live"+   SetUnitDebugText(self "I Live"
-</code> +</code> 
 + 
 +===== See Also ===== 
 + 
 +[[cw4:Programming notes]] 
4rpl/commands/func_awake.1610638080.txt.gz · Last modified: 2021/01/14 10:28 by virgilw