- Messages
- 114
So I am finally getting to making some MCM mods for other mods without MCM settings. For this I want to make debug functions, such as adding items with a button. But no matter what I do either it doesnt work, or the compiler just keeps spitting out errors. Most common error is "OnPlayerLoadGame is not a script object".
Here is my script:
Here is my script:
Code:
Scriptname HorizonMCMSettings:Main extends Quest
; ---------------------------------------------
; Properties
Group Main
Actor Property PlayerRef Auto Const Mandatory
{
The Player. FormID: 00000014
}
GlobalVariable Property bEnabledDebug Auto
{
Handles debug functions
}
GlobalVariable Property ModVersion Auto
{
Current mod version
}
GlobalVariable Property iExpectedHorizonVersion Auto
{
What horizon verion the mod is made for
}
GlobalVariable Property HorizonVersionCurrent Auto
{
What version of horizon is currently loaded
}
Quest Property MQ101 Auto Const Mandatory
{
First main quest, "War Never Changes"
}
Quest Property MQ102 Auto Const Mandatory
{
Second main quest, "Out of Time"
}
EndGroup
Group Items
MiscObject Property Item_PurifierRegulator Auto
{
This is for the purifier module. FormID: 0x00002B52
}
EndGroup
; ---------------------------------------------
; ---------------------------------------------
; Variables
; ---------------------------------------------
; Events
Event Actor.OnPlayerLoadGame(Actor player)
Self.RegisterEvents()
Self.ManagePurifierItem()
EndEvent
; ----------------------------------------
; Functions
Function RegisterEvents()
Self.RegisterForRemoteEvent(PlayerRef as ScriptObject, "OnPlayerLoadGame")
EndFunction
Function ManagePurifierItem()
PlayerRef.AddItem(Item_PurifierRegulator as Form, 1, False)
Debug.Notification("Purifier Module Added")
EndFunction
Event OnInit()
Self.ManagePurifierItem()
EndEvent
Attachments
Last edited: