Damnit, no use, still returns as zero...what the hell am I missing...
For reference, here's the script in full.
scriptname cohTransformTiming extends Quest{Controls the Timing for transformation.};calling properties, spells, globals, and importing the maths. import Math float property cohGetMoonPhase auto float property cohPhaseDay auto bool property cohCanTransform auto bool property cohbmvar auto bool property IsFirstChange auto Spell property WerewolfChange auto GlobalVariable Property GameHour auto GlobalVariable Property GameDaysPassed auto GlobalVariable Property PlayerIsWerewolf auto GlobalVariable Property PlayerWerewolfShiftbacktime auto MagicEffect Property WerewolfChangeEffect auto ; The script should run once every in game minute in this state, otherwise the flavor texts could be desychronized.Event OnInit()RegisterForUpdate(1)EndEvent Event OnUpdate(); Determining Moon Phase Below...Not yet implimented. int timeOfDay = GameHour.GetValueint() int DaysPassed = GameDaysPassed.GetValueint(); Ignore PhaseDay, not functioning in this iteration of the script.;/List of moon phases returned by cohGetMoonPhase.0 = full moon1 = 3/4 waning2 = half waning3 = 1/4 waning4 = new moon5 = 1/4 waxing6 = half waxing7 = 3/4 waxing/;;Not sure what cohPhaseDay should return, though one is an adequete placeholder.debug.Notification(PlayerIsWerewolf.GetValue()) If TimeOfDay >= 20 || TimeOfDay < 6 cohCanTransform == trueelse cohCanTransform == falseendif; Hell, it's morphing time! if ( PlayerIsWerewolf.GetValue() == 1 && cohCanTransform == true ) && IsFirstChange == true && game.getplayer().HasMagicEffect(WerewolfChangeEffect) == 0 debug.notification("The player can transform!!!") PlayerWerewolfShiftbacktime.SetValue(10000) WerewolfChange.Cast(Game.GetPlayer(), Game.GetPlayer()) Utility.WaitGameTime ( 0.05 ) Debug.Notification ("Generic Flavor Text") elseif PlayerIsWerewolf.GetValue() == 1 && cohCanTransform == true && IsFirstChange == false && game.getplayer().HasMagicEffect(WerewolfChangeEffect) == 0 PlayerWerewolfShiftbacktime.SetValue(10000) WerewolfChange.Cast(Game.GetPlayer(), Game.GetPlayer()) Utility.WaitGameTime ( 0.05 ) Debug.MessageBox ("First Post Transform Flavor Text") elseif PlayerIsWerewolf.GetValue() == 1 && game.getplayer().HasMagicEffect(WerewolfChangeEffect) == 1 && cohCanTransform == false PlayerWerewolfShiftbacktime.SetValue(1)endifEndEventall the global variable properties are set to reference the appropriate variable, I just don't know what to do now.
Could it be the fault of the "oninit" event?
I actually think it might be just that...
In my theory the script, since its not linked to the quest by a papyrus fragment that registers it form activation rather than putting an oninit event in the source script; since the properties are stored in the quest, things don't work as intended.
Alternatively, do I need to figure out QuestStage fragments (http://www.creationkit.com/Quest_Stage_Fragments)? Or do I just need to set kmyQuest to reference my script? So many questions.