MessageBox Tutorial/External Menu Selection

From the Oblivion ConstructionSet Wiki
Revision as of 09:57, 17 June 2007 by imported>Haama (New page: As it's setup now, the first menu the player sees will always be the same. If you want to start with a different menu, set '''''Choosing''''' to your desired menu, as such: <pre>set YourAc...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

As it's setup now, the first menu the player sees will always be the same. If you want to start with a different menu, set Choosing to your desired menu, as such:

set YourActivator.Choosing to -2 ;the "Food" menu in the example
YourActivator.Activate player, 1

You need to make one small change to your menu script as well. Change

begin onActivate
  set Choosing to -1
...

to

begin onActivate
  if (Choosing == 0)
    set Choosing to -1
  endif
...

Also, if you want to allow the menu to be reset if it's still trying to catch the player's choice (GetButtonPressed keeps returning -1), then use

  if (Choosing >= 0)

instead.