Problem description:
I am a little stuck here. When pressing run, the world directly loads the map. Now I have to create a main menu screen. How do I stop the map from loading and load the images for menu?
In short how do I create the main menu first?
Thanks in advance.
Regards
ID:1047050
Nov 10 2012, 8:05 am (Edited on Nov 14 2012, 7:14 am)
(See the best response by Zohan98.)
|
|
I am totally stuck here. Can someone give me some idea how to do it. No input/output interfaces. Just images with mouse click.
mob Here is the create player proc proc Thanks in advance Regards |
There are multiple ways you can preform this task, although i'm not going to spoon-feed you and script it for you but provide some guidelines.
1 way to do this process is by using the Interface option, which gives you a handful of powerful controls you can use to customize your window, how the way you want. The clicks will be controlled by a widget called "Button"(Well, most of them) Another way is to do it the old fashion way(which for some odd reason I do not support.) By placing images onto your map and controlling your user to the objects placed on the map with: usr.client.eye By positioning the user's eye over parts of the map. Now clickable objects can be done something like this... obj etc. etc. Try exploring with these options, if you need any help just be sure ask. |
I have set up everything. The only thing that I still don't understand is the login. Either my mainmenu shows up or the level. Both are working as expected. The problem is it ain't going one after another. Mainmenu should come before login. That's what I don't understand how to do!
I am using interface, just don't want to use it in main menu. A little confusing! Thanks for the reply. Regards |
You can use a procedure called
winshow(who,"nameofwindow",1 or 0) //1 meaning SHOW. You can ALSO prevent windows from showing up when the mob/Login() is called. By: Right clicking on the window and clicking edit> and uncheck Visible.... so it would go something like this... mob |
Yes, that is how I am doing. Everything is working fine.
Only thing which is not working is the above function - CreatePlayer(), only if I call the function MainMenu(). If I remove mainmenu function and just call the createplayer function it works. if I call the mainmenu function (like above), only mainmenu and other hud/interfaces works. It does not create the player. Say, I have a button (e.g - create) in mainmenu function which is an obj. I only want to call the CreatePlayer() function when it is clicked than login. I think I should take time to understand login and complete the other staff first then come back to mainmenu. Thanks for your help and time. Regards |
In mainmenu, it only contain the creation of hud obj and its placement on screen. Some clickable button and some background images, like a normal game menu. So that player can select the race - Human or Elf etc. than load the character (call CreatePlayer() function).
I don't want to use any interface window in mainmenu. Only plain png images (clickable buttons). That's it. When the world is created, is it possible to hold the mob - world In spite of creating the mob, create the Mainmenu - world Then when click the "Create" button in menu - Click() Something like that! Else I should take time. Thanks, Regards. |
Sure -
proc Here is the mainmenu class MainMenu Here is button click - obj In MenuButtonClick(), it checks for the .name of the obj and if true processes the call, if any. Regards |
You are calling CreatePlayer at login. You should give the player a chance to choose a race first.
mob Then obj/MenuButton Note: No usr in procs. The only exemption is in mouse operations. |
Regards.