Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ScriptName JasperSwitchStatic Extends ObjectReference
- ; v0.1 https://www.reddit.com/r/skyrimmods/comments/4eto2z/better_papyrusscripting_can_you_help/
- int index = -1
- ObjectReference[] Property Statics Auto
- Event OnActivate(ObjectReference akActionRef)
- index += 1
- SetScheme(Statics, index)
- Debug.MessageBox("Activated scheme "+index+" using "+Statics[index].GetName())
- Endevent
- Function SetScheme(ObjectReference[] akStatics, int aIndex)
- int len = akStatics.Length
- int idx = -1
- While(idx < len)
- idx += 1
- If(idx == aIndex)
- akStatics[idx].Enable()
- Else
- akStatics[idx].Disable()
- EndIf
- EndWhile
- EndFunction
Add Comment
Please, Sign In to add comment