load a level from the menu?
by rave crocker · in Technical Issues · 12/10/2013 (3:34 pm) · 4 replies
hey guys sorry if this is the wrong place but i've been looking for a few hours off and on and I cant seem to find what i need, basicly i want to have the play button in the main menu load the level empty room instead of the level selector, i've looked at the level selector but i dont see it executing any commands, if anyone knows a way thats as simple as possible to do that'd be great
-Rave
-Rave
#2
12/10/2013 (4:46 pm)
and how would i attach that to a button?
#3
12/10/2013 (5:08 pm)
Put it in the command field of the button on the gui or make a onClick() function call in script. Read up on the GUI editor and it's tutorials in the documentation.
#4
12/11/2013 (6:49 am)
In art/gui/mainMenuGui.gui find the Play button and make this change:// change existing line
Command = "Canvas.pushDialog(ChooseLevelDlg);";
// to
Command = "createAndConnectToLocalServer("singleplayer", "levels/empty room.mis");";And then go read the GUI documentation and tutorials.
Associate Steve Acaster
[YorkshireRifles.com]
You'll want a function which has something like:
createAndConnectToLocalServer("singleplayer", "levels/empty room.mis");