ScriptName aaTimeScript extends ObjectReferenceGlobalVariable Property TimeScale AutoMessage Property aaTimeMsg autoEvent OnActivate(ObjectReference akActivator) Int iButton = aaTimeMsg.Show() If (iButton == 0) ; TimeScale != 30 TimeScale.SetValue(30) ElseIf (iButton == 2) ; TimeScale != 20 TimeScale.SetValue(20) ElseIf (iButton == 3) ; TimeScale != 10 TimeScale.SetvValue(10) ElseIf (iButton == 4) ; TimeScale != 5 TimeScale.SetValue(5) EndIfEndEvent
The first button is 0 rather than 1 and the property won't autofill unless its name matches the existing global, TimeScale, exactly. Also, I'd add the conditions (the commented stuff) to your MessageBox buttons accordingly so only applicable buttons show.
You could do this all with an inventory item...
ScriptName TimeArmorScript extends ObjectReferenceArmor Property TimeARMO AutoGlobalVariable Property TimeScale AutoMessage Property aaTimeMsg AutoEvent OnEquipped(Actor akActor) If akActor == Game.GetPlayer() Game.GetPlayer().UnequipItem(TimeARMO, False, True) Menu() EndIf EndEvent;=================================Function Menu() Int iButton = 0 Int bMessage = 1 While bMessage If (iButton != -1) iButton = aaTimeMsg.Show() If iButton == 0) TimeScale.SetValue(30) Debug.Notification("TimeScale set to 30") ElseIf (iButton == 2) TimeScale.SetValue(20) Debug.Notification("TimeScale set to 20 (Default)") ElseIf (iButton == 3) TimeScale.SetvValue(10) Debug.Notification("TimeScale set to 10") ElseIf (iButton == 4) TimeScale.SetValue(5) Debug.Notification("TimeScale set to 5") ElseIf (iButton == 5) ; Done bMessage = 0 EndIf EndIf EndIf EndFunction^fix'd