- Messages
- 4,447
I saw this interesting tid bit posted by Halstrom over at Lover's Lab. Seems like it could have uses beyond what is described.
Scriptname SynthPlayer:Synth4Power extends ReferenceAlias
Can you call ObjectReference events in a ReferenceAlias script? i.e. Player grabs item, set next quest stage.
I'm not well versed in aliases, but if it can work this way, it would be really useful!
You can also create an Alias in the quest based on the Player and add your scripts to that, you don't needt to register OnPlayerGameLoad then, it allows you to use pretty much every function then otherwise you may finding stuff you can't do in quest scripts or actor scripts without causing dirty edits.
Scriptname SynthPlayer:Synth4Power extends ReferenceAlias
Code:
Scriptname SynthPlayer:Synth4Power extends ReferenceAlias
{Power Management}
Group Misc
Quest Property qMQ101 Auto Const
EndGroup
;-----------------------------------------------------------------------------------------------------------------------------
Actor rActor
String sScriptName = "Power"
Int iBootup
Int iDebugSetting
;-----------------------------------------------------------------------------------------------------------------------------
Event OnInit()
Utility.Wait(1.0)
rActor = Game.GetPlayer()
fPowerLevel = 80.0
fnInit()
StartTimer(fFrequencyTimer, iTimerID)
EndEvent
Event OnPlayerLoadGame()
fnInit()
EndEvent
Function fnInit()
fPrevTime = Utility.GetCurrentGameTime()
EndFunction
Can you call ObjectReference events in a ReferenceAlias script? i.e. Player grabs item, set next quest stage.
I'm not well versed in aliases, but if it can work this way, it would be really useful!