Difference between revisions of "MessageBox Tutorial"

Jump to navigation Jump to search
136 bytes added ,  17:46, 26 August 2007
imported>Haama
imported>Haama
elseif (Choice == 0)</pre>
 
===Timing===
===Which Block to run MessageBox and GetButtonPressed?===
MessageBox takes one frame to display, so you can use any [[:Category:Blocktypes|block]] to display it. However, it can take up to 15 frames before GetButtonPressed will return the player's button press (even if the player presses the button on the same frame as the MessageBox function). Therefore, it needs to be in a block that continuously runs (i.e.every frame, such as [[GameMode]], [[MenuMode]], and [[ScriptEffectUpdate]]). andIt also needs to be on a script that is running every frame (i.e., anFor activatorobjects thatthis ismeans it must be in a loaded[[Loaded]] cell, afor questquests runningthis everymeans .001[[Special seconds,variables#Locals|fQuestDelayTime]] etc.),must untilbe itset returnsto the player's button press.001 Thisand isthey necessarymust asbe itrunning, will take more than a frameand for thespells playerthis to readmeans the menuduration andmust makebe along decisionenough (asmore wellon asthat in the someSpell otherMenus peculiaritiessubsection).
 
===Keep 'em separated===
Anonymous user

Navigation menu