Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scriptname IA_Bulwark_ArmorSwap extends ObjectReference
- GlobalVariable Property IAApotheusMaster Auto ;Our master toggle which is set in the preceding McM script Global = 1(On/Default) Global = 0(Off)
- GlobalVariable Property IAApotheusModded Auto ;Our modded set of armor's variable. In this instance it should Global = 0(On/Default), but should be global = 100(Off) when the Master Master Gvar = 0
- GlobalVariable Property IAApotheusVanilla Auto ;Our vanilla set of armor's variable. In this instance it should Global = 1(Off/Default), but should be global = 0(On) when the Master Master Gvar = 0
- State IAArmorSwap ;State and Gval IAApotheusMaster set in McM
- Event OnBeginState()
- If GetState() == "IAArmorSwap"
- ;here starts our catch for idiots who mess with Gvars in the console. Our values must be preserved or weird things will happen.
- If IAApotheusModded.GetValueInt() > 100 || IAApotheusModded.GetValueInt() < 0 || If IAApotheusVanilla.GetValueInt() > 100 || IAApotheusVanilla.GetValueInt() < 0
- IAApotheusModded.SetValue(0); Turns ON the modded sets again
- IAApotheusVanilla.SetValue(100); Turns OFF the Vanilla sets again
- Debug.MessageBox("Dude, leave my damned Gvars alone. Do you like breaking things? APOTHEUS armor is Distributed... Stop messing with stuff... Please!?")
- Debug.Trace("IA-UTILITY: Eckss, Hoth this guy has been screwing with the globals... Disregard his damned bug reports")
- Elseif IAApotheusMaster.GetValueInt() == 0 ;If they turned off the armor in the McM
- IAApotheusModded.SetValue(100); OFF
- IAApotheusVanilla.SetValue(0); ON
- Debug.MessageBox("Apotheus armor removed from distribution!")
- ElseIf IAApotheusMaster.GetValueInt() == 1 ;1 is the armory ON
- IAApotheusModded.SetValue(0); ON
- IAApotheusVanilla.SetValue(100); OFF
- Debug.MessageBox("Apotheus armor is distributed!")
- Else
- Endif
- Else
- Endif
- EndEvent
- EndState
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement