Setting preference for map types
by Richard Preziosi · in Torque Game Engine · 10/07/2009 (11:54 pm) · 1 replies
So I want to set up check boxes to select game type, and I have an idea of how to start this, but I think it's gonna be a little more advanced than I think. Hopeing to get some help, gonna post out what I have so far.
In my gui to start the mission, each checkbox has a variable that sets the mapType, which is simply set by pref::DM or pref::CTF.
This is how I would set up the mission file.
Then ofcourse I would add a filter for the join game screen, that would either filter out or display the gametype next to the map name. Is this the proper way of going about this, I feel like it should work, but I'm not a strong coder, so figured I would ask before I tried to implement and save myself from getting mad/discouraged.
Thanks
In my gui to start the mission, each checkbox has a variable that sets the mapType, which is simply set by pref::DM or pref::CTF.
// Map Type
function SelectMapType()
{
if($pref::DM)
{
%mapType = "DM";
}
if($pref::CTF)
{
%mapType = "CTF";
}
}This is how I would set up the mission file.
//Map Type
function SetMapType()
{
if(%mapType = "DM")
DEFINE WIN/LOSE SCENERIOS, ETC
DEFINE TAG FOR FILTER/DISPLAY MAPTYPE
}
{
if(%mapType = "CTF")
DEFINE WIN/LOSE SCENERIOS, ETC
DEFINE TAG FOR FILTER/DISPLAY MAPTYPE
}
}Then ofcourse I would add a filter for the join game screen, that would either filter out or display the gametype next to the map name. Is this the proper way of going about this, I feel like it should work, but I'm not a strong coder, so figured I would ask before I tried to implement and save myself from getting mad/discouraged.
Thanks
Torque Owner Richard Preziosi
WinterLeaf Entertainment