After struggling (and finally succeeding) to even get a simple messagebox to appear, this is what I have so far:
Scriptname aaMenuTemplate extends ObjectReferenceMessage property box1 auto{Points to the message box that is shown on the first activation.}int countint choiceint chosenEvent OnActivate(ObjectReference akActionRef) count = count + 1 GetMessage(count).Show()endEventMessage function GetMessage(int currentCount) Message chosenMessage chosenMessage = box1 Return chosenMessageendFunctionEvent GameMode(ObjectReference akActionRef) if chosen set choice GetButtonPressed if choice > -1 set chosen to 0 if choice == 0 (resulting code) elseif choice == 1 (resulting code) elseif choice == 2 (resulting code) elseif choice == 3 return endif endif endifendEventWell that doesn't work. Here is the errors produced:
.psc(28,13): required (...)+ loop did not match anything at input 'GetButtonPressed'
.psc(28,2): function variable choice already defined in the containing script
.psc(32,14): required (...)+ loop did not match anything at input 'to'
.psc(32,3): function variable chosen already defined in the containing script
.psc(32,14): no viable alternative at input 'to'
I don't fully understand these errors and what to do about them.
