OnPlayerLoadGame - Actor
Revision as of 14:23, 1 December 2018 by imported>Scrivener07 (→Notes: wont fire for the first time on the first load.)
Member of: Actor Script
Event called when the player loads a save game. This event is only sent to the player actor.
Syntax
Event OnPlayerLoadGame()
After Patch 1.5:
Event Actor.OnPlayerLoadGame(actor aSender)
Parameters
- aSender: The actor sending the event.
Examples
; Event is only sent to the player actor. This would probably be on a magic effect or alias script
Event OnPlayerLoadGame()
Debug.Trace("player loaded a save, do some fancy stuff")
endEvent
After Patch 1.5:
;This event is on a quest (like HC_ManagerScript)
Event Actor.OnPlayerLoadGame(actor aSender)
Debug.Trace("player loaded a save, do some fancy stuff")
if false == Game.GetPlayer().HasPerk(myCoolPerk) ; Let's check to see if the player has the cool new perk.
Game.GetPlayer().AddPerk(myCoolPerk) ; If they don't, then add it.
Debug.Trace("Player now has" +myCoolPerk)
endif
endEvent
Notes
- This event is only sent to the player actor. It is recommended that you handle this event via an alias the player is forced into, or a magic effect on the player.
- After Patch 1.5, event is also handled via quest.
- This event will fire for the first time on the next load.