Game Development Community

I have 3 hard questions.

by Alexander B · in Torque Game Engine · 10/15/2008 (12:37 am) · 38 replies

I have 3 questions that i need to implent in my MMORPG. Thanks in advance.

1. How do i implent a character creation and selection screen. At the moment i just want a basic one that only has one model and all you do is selct a name.

2. Does anyone know how to implent a simple login screen that connects to a server and makes sure the username and password are correct then goes to the character selection screen?

3. How do i put lots of differnt missions in the game so when the player reaches a certian point the game will load the next mission and the player ends up in the place the mission starts?
Page«First 1 2 Next»
#21
10/27/2008 (2:43 pm)
What is your player selection code? Post it here and we'll try to help.

Tony
#22
10/27/2008 (9:37 pm)
What do you mean infinitum? I just used Chris C2 Byers player slection resource. I just don't know how to put in a simple GUI button to load up the game.
#23
10/28/2008 (2:28 am)
He is asking what is the name of the function that contains the workings of your player selection GUI- not the gui itself but the code that controls it. Your button itself is placed using the GUI Editor in whatever menu you are working from. This button will have a field called command. When you click the button then the command executes function nameOfControl().

If you've got the player selection GUI integrated it's a simple matter to pop it up when you click a button. I'm pretty sure that an example of doing so is part of the resource. To load up the game itself you only need to look at the existing load mission GUI that is already there in the scripts and incorporate that functionality as part of your player selection GUI.
#24
10/28/2008 (5:04 am)
Alexander,

Have you created the button in you playGui.gui?

If not, the gettingStarted tutorial shows how to create the button.

If you have a button and just need help getting it to pop your playerSelectionGui.gui then I think you need to write a function, something like

$selectPlayer == false;
function togglePlayerSelectGui(%val)
{if ($selectPlayer == false)
{commandToServer('DisplaySelectionGUI');
$selectPlayer == true;
}else{
Canvas.setContent( PlayGui);
$selectPlayer == false;
}
}

Then in the button command line put

togglePlayerSelectGui

Note! I haven't tried this, I just know this is how the Inventory pop code works. You need to use YOUR name in place of displaySelectionGui.

Tony
#25
10/30/2008 (11:27 pm)
Ok so what i have done is made a new file in starter.fps\client\ui called playerSelectionGui.gui and put in the code the resource tells you to put in (it's the last bit on the resource) Im a bit unsure what to do next tho. Do i open up playGui.gui and put in

$selectPlayer == false;
function togglePlayerSelectGui(%val)
{if ($selectPlayer == false)
{commandToServer('DisplaySelectionGUI');
$selectPlayer == true;
}else{
Canvas.setContent( PlayGui);
$selectPlayer == false;
}
}

after


new GuiBitmapCtrl() {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "top";
position = "50 299";
extent = "32 172";
minExtent = "8 8";
visible = "1";
helpTag = "0";
bitmap = "./healthBar";
wrap = "0";
};

Or do i do something else?
#26
10/31/2008 (12:51 pm)
Yes, try that and check for any console erroorrs or debug errors. Just make sure that the button command is your function name, where it says togglePlayerSelectGui

Tony
#27
10/31/2008 (4:08 pm)
Ok i have put the code you told me to put in to the playgui.gui and i made a new GUIbuttonctr and made it's command togglePlayerSelectGui but nothing happened. I checked the console and it said parse error. Myaby im using the wrong command. How do i know what my function name is?
#28
11/02/2008 (8:32 am)
Looking briefly at the resource, it looks like it could be

function playerSetupGui
#29
11/03/2008 (9:48 pm)
I did the exact same thing but made the command function playerSetupGui but it just said parse error.
#30
11/05/2008 (12:27 pm)
I put in function playerSetupGui in the console but it also said nothing. What should i do?
#31
11/08/2008 (3:00 pm)
Anyone?
#32
11/08/2008 (7:17 pm)
Alexander,

I'll try out the resource myself this week and see if I can help more. It's going to take me a couple days, but I'll let you know what I come up with.

Is there something else you can work on in the meantime? If not, keep trying. Go back, re-read the resource, and see if you missed anything.

Tony
#33
11/08/2008 (7:57 pm)
Ok thanks infinitum :)
#34
11/11/2008 (9:17 am)
Try making the command

"Canvas.setContent(playerSelectGui);";

where playerSelectGui is the name of YOUR player selcting gui.

Tony
#35
11/12/2008 (10:17 pm)
I changed my GUI file in client/UI to playerSelectGui.gui and made the command
Canvas.setContent(playerSelectGui); but it did't work. The console said it was an invalid command. I think i have done something wrong in the playGUI. What did you put in the playGUI?

I have put in

$selectPlayer == false;
function togglePlayerSelectGui(%val)
{if ($selectPlayer == false)
{commandToServer('DisplaySelectionGUI');
$selectPlayer == true;
}else{
Canvas.setContent(PlayGui);
$selectPlayer == false;
};
#36
11/13/2008 (4:49 am)
Change your Command to Server to 'DisplayPlayerSelectGUI'

You can test it with a keybind

moveMap.bindCmd(keyboard, "t", "togglePlayerSelectGUI();", "");

as long as you haven't already bound "t" to anything.
#37
11/13/2008 (9:04 pm)
Ok i have put in moveMap.bindCmd(keyboard, "k", "togglePlayerSelectGUI();", "");
in config.cs and changed

$selectPlayer == false;
function togglePlayerSelectGui(%val)
{if ($selectPlayer == false)
{commandToServer('DisplaySelectionGUI');
$selectPlayer == true;
}else{
Canvas.setContent(PlayGui);
$selectPlayer == false;
};

to

$selectPlayer == false;
function togglePlayerSelectGui(%val)
{if ($selectPlayer == false)
{commandToServer('DisplayPlayerSelectGUI');
$selectPlayer == true;
}else{
Canvas.setContent( PlayGui);
$selectPlayer == false;
};

When in game at the main screen i click "k" but nothing happens. Also when i click f11 it gets stuck at loading objects. Also the last line in console.log says Releasing the device context...

What am i doing wrong?
#38
11/16/2008 (2:19 am)
It still doesn't work. Should i just start again?
Page«First 1 2 Next»