PDA

View Full Version : Buy menu



legacy-Doc_EDo
07-04-2003, 11:10 PM
Does anyone have some guidelines on what to do to make a buy menu?
I know how to program GUI,HUD, pawns etc.

legacy-Doc_EDo
07-05-2003, 05:38 PM
Anyone? :eek:

Boksha
07-06-2003, 01:30 PM
Arf. Menus with influence are ALWAYS a problem.
If you know how to program a GUI in UT2003, maybe your problem could be a bit more specific?

legacy-Kaoh
07-07-2003, 07:19 AM
I assume you can make a in game menu (if not see the ut2ingamenu class as example).
What I then do is let the code either save the selected settings in to a inni file then on spawn (or where you need it) read that ini to restore the ini's or if you only want them temporary store them in the player replication class of the player and use that to select waht to spawn.

legacy-Darkblaster
07-08-2003, 12:38 PM
I created a buy menu for my mod:
I used a interaction to call a GUI-Page, when a key is pressed.
From my interaction:


simulated function bool KeyEvent(EInputKey Key, EInputAction Action, FLOAT Delta )
{
if (Action == IST_Press)
{
if (Key == IK_B)
{
ViewportOwner.GUIController.OpenMenu("YourMod.YourGUIPage");
}
}
}

Don't forget to add your interaction(InteractionMaster.AddInteraction);
You know how to create GUI-Page, but you will face one problem:
GUI-stuff only exists client-side, so have to be careful with replication cuz u can't spawn e.g. weapons from the GUI-Page,
u have to work with replicated variable(one possible solution).