FBA The Creator
http://www.fbacreator.com/fbaforum/

menu problem's
http://www.fbacreator.com/fbaforum/viewtopic.php?f=5&t=119
Page 1 of 1

Author:  freeko55 [ Sun Sep 14, 2008 10:47 pm ]
Post subject:  menu problem's

I am making an application but I don't know how to make a menu that after you hit enter it goes to main script

Author:  umbiomar [ Tue Sep 16, 2008 8:02 pm ]
Post subject:  Re: menu problem's

Actually is very easy, if you see the game like a state machine.
During run time your app is in a state (ie.say MENU_STATE). On user action the game change state (say MAIN_STATE).

The full logic is coded in the onmainloop() event. The following is the main loop of the Enlight Game from the example projects coming with FBA.

function onmainloop()

if CURRENT_STATE == STATE_MENU then
DoMenu()
elseif CURRENT_STATE == STATE_PLAYING then
DoGame()
end
DoStars()
end

Author:  freeko55 [ Sun Sep 21, 2008 5:22 pm ]
Post subject:  Re: menu problem's

i don't get it how to i make it so that they press enter at a menu which i need the code for then they go to the main script

Author:  umbiomar [ Tue Sep 23, 2008 5:17 pm ]
Post subject:  Re: menu problem's

please explain further what you want to do and why the samples provided dont fit your needs.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/