I have seen Game Menu in FourDee's Tr-Zero.That menu can be controlled by Arrow Keys.Anybody know how to create a Menu controlling by Arrow Keys.
This forum is now archived!
- Welcome to the archive!
News:
The 3DRad community can be found at classdev.net.
- 3D Rad - Free 3D game maker - Forum >
- General Category >
- 3D Rad - Artist's Discussion Forum >
- Game Menu
Author Topic: Game Menu (Read 104 times)
Using iKeyDown(iKeyCode("")), with "DIK_LEFT", "DIK_RIGHT", "DIK_UP" and "DIK_DOWN"...
EDIT: I found psikoTs menu system: http://www.3drad.com/forum/index.php?topic=9107.msg76749#msg76749
It's very good, I'm currently using (my own version of) this method.
EDIT: I found psikoTs menu system: http://www.3drad.com/forum/index.php?topic=9107.msg76749#msg76749
It's very good, I'm currently using (my own version of) this method.
No need to roll them eyes it's a valid question, but I think it might have been answered a zillion times before... Not exactly rocket science, but you need a variable to track the bar position and increase and decrease that var with the arrow keys. Then you need a variable to know what menu you're at (main menu, options menu, character menu etc.) this could be a string, so you can just set that sting to the menu you wanna go to.
some pseudo code:
int BarPos;
string currentMenu;
if(currentMenu== Main){
// do some options stuff;
// move bar:
if(iKeyDown(iKeyCode("DIK_UP")) BarPos+=1;
if(iKeyDown(iKeyCode("DIK_UP")) BarPos-=1;
}
if(currentMenu== Options){
// do some options stuff;
// move bar:
if(iKeyDown(iKeyCode("DIK_UP")) BarPos+=1;
if(iKeyDown(iKeyCode("DIK_UP")) BarPos-=1;
}
some pseudo code:
int BarPos;
string currentMenu;
if(currentMenu== Main){
// do some options stuff;
// move bar:
if(iKeyDown(iKeyCode("DIK_UP")) BarPos+=1;
if(iKeyDown(iKeyCode("DIK_UP")) BarPos-=1;
}
if(currentMenu== Options){
// do some options stuff;
// move bar:
if(iKeyDown(iKeyCode("DIK_UP")) BarPos+=1;
if(iKeyDown(iKeyCode("DIK_UP")) BarPos-=1;
}
No need to roll them eyes it's valid question...
I'm 'rolling them eyes' because this question is one of those 'how do I make a game' question. It might be valid, but since there are hundreds ways to do it, it doesn't have a solid answer.
Pages: [1]