Event for when a specific Cell finishes loading

Post » Sun Oct 18, 2015 2:58 am

Hi there everyone,

I was wondering how to script an event that will fire when I cell has finished loading?

When my particular custom cell has finished loading I would like to present the player with a menu to configure my mod and also to customise their character.

These menus can be seen http://i.imgur.com/1UYpRbq.jpg and http://i.imgur.com/SfwH3Fp.jpg.

This is my code thus far:

Spoiler
Event OnInit()	;If (PlayerRef.GetCurrentLocation() == AA92GreedyMermaidLocation)		;Debug.Notification("Location Found")		; Remove all items from the players inventory to a chest within the AA92GreedyMermaid cell.		PlayerRef.RemoveAllItems(AA92EdaChest, true, false)				; Silently equip the player with Ragged Robes		PlayerRef.AddItem(ClothesBeggarRobes, 1, true)		PlayerRef.EquipItem(ClothesBeggarRobes, false, true)		; Having the player select the game mode		Int iButton = AA92GameModeSelectionMsg.Show()		If iButton == 0  ; Normal Game Mode			GuidedModeEnabled = false				Debug.Notification("Captive at Sea: Normal Game Mode Activated")		ElseIf iButton == 1 ; Guided Game Mode			GuidedModeEnabled = true				Debug.Notification("Captive at Sea: Guided Game Mode Activated")		EndIf		; Having the player create their character		Int jButton = AA92CharacterCreationMsg.Show()		If jButton == 0			Game.ShowRaceMenu()		EndIf	;EndIfEndEvent

I had quite a useful reply from Scrivener07 in the Quick Questions Quick Answers thread, Scrivener suggested listening for when the loading menu to close:

Spoiler

However, this solution requires functions from the Skyrim Script Extender (SKSE), which is a dependency I'd like to avoid if possible, purely to make my mod as accessible as possible.

I'm sure there has to be a specific and more elegant way to do this?

I know there is both http://www.creationkit.com/OnCellLoad_-_ObjectReference and http://www.creationkit.com/OnLoad_-_ObjectReference events - but when I use either of these they never seem to fire?

It may be important to mention that I use the COC console command to get to my cell.

Any suggestions or advice you guys can share would be greatly appreciated!

Thanks,

Allan

User avatar
Jani Eayon
 
Posts: 3435
Joined: Sun Mar 25, 2007 12:19 pm

Return to V - Skyrim