Modding:Adding Code at Startup: Difference between revisions

Jump to navigation Jump to search
Add AfterGameLoaded hook
m (→‎Overview: remove beta category)
(Add AfterGameLoaded hook)
Line 29: Line 29:
* After player is created for a New Game
* After player is created for a New Game
|| Code runs only once when a New Game starts, after the player object is first created. Is never called again. Useful if you want your code to run only once per save file. For example, you might add a custom part to the player that holds your code. For more information about this method, refer to [[Modding:Adding Code to the Player]].
|| Code runs only once when a New Game starts, after the player object is first created. Is never called again. Useful if you want your code to run only once per save file. For example, you might add a custom part to the player that holds your code. For more information about this method, refer to [[Modding:Adding Code to the Player]].
|-
| '''AfterGameLoaded Hook''' ||
* After a save game is loaded and the Player object exists
|| Code runs immediately after a save game is loaded, and when the Player object exists. Useful if your code needs to modify the player object after a save game load (similar to PlayerMutator for new games). For more information about this method, refer to [[Modding:Adding Code to the Player]].
|-
|-
| '''Harmony Injection''' ||
| '''Harmony Injection''' ||

Navigation menu