RealmWars map clycling
by Ace · in General Discussion · 03/24/2002 (9:17 am) · 8 replies
hey it works awesome when implimented in my demo,,,,what im wordering is there a way to only let it cycle when in multiplayer and not in singleplayer?
in singleplayer i need it to cycle only when contacting a trigger or somthing so the player has a chance to finish the level.
(im not that great with script)
thanks
in singleplayer i need it to cycle only when contacting a trigger or somthing so the player has a chance to finish the level.
(im not that great with script)
thanks
About the author
Ace Owner of NoESCape.sytes.net starting from the beginning on 3d torque
#2
You could set your game duration here or just make the %serverType variable global ($serverType) and access it from your game.cs...
Does that help?
03/25/2002 (7:03 am)
If you look into startMissionGui, you see how the single-/multiplayer stuff is initialized:if ($pref::HostMultiPlayer)
%serverType = "MultiPlayer";
else
%serverType = "SinglePlayer";
createServer(%serverType, %mission);
localConnect($pref::Player::Name);which means if the user selects the multiplayer checkbox, %serverType is set to "MultiPlayer"...You could set your game duration here or just make the %serverType variable global ($serverType) and access it from your game.cs...
Does that help?
#3
if ($pref::HostMultiPlayer) {
$Game::Duration = 05 * 05;
}else{
$Game::Duration = 00 * 00;
}
and it does do the
$Game::Duration = 05 * 05;
but has no effect on single player,,,im going to try
if ($pref::HostMultiPlayer)
%serverType = "MultiPlayer";
$Game::Duration = 05 * 05; //this is for devtesting
else
%serverType = "SinglePlayer";
$Game::Duration = 00 * 00;
in the startmission gui and see what happens
thanks
03/25/2002 (7:33 am)
heh, ya , i noticed that and am still messing with it i tried (in game cs)if ($pref::HostMultiPlayer) {
$Game::Duration = 05 * 05;
}else{
$Game::Duration = 00 * 00;
}
and it does do the
$Game::Duration = 05 * 05;
but has no effect on single player,,,im going to try
if ($pref::HostMultiPlayer)
%serverType = "MultiPlayer";
$Game::Duration = 05 * 05; //this is for devtesting
else
%serverType = "SinglePlayer";
$Game::Duration = 00 * 00;
in the startmission gui and see what happens
thanks
#4
03/25/2002 (7:52 am)
heh i just dont get it....but am still tring
#6
02/20/2004 (11:15 pm)
Old thread, dude. :)
#7
02/28/2004 (11:53 am)
Oh lol
#8
02/28/2004 (9:00 pm)
I have mine set up, so when a certain gametype is read from the mission file, it loads the corinspoding game play type, i ripped it out of realmwars, so it should work.
Torque Owner Ace
this is in my game.cs:
// Game duration in secs, no limit if the duration is set to 0
$Game::Duration = 20 * 60
:::
i need something like this:
// Game duration in secs, no limit if the duration is set to 0
if (ML_multiplayer){
$Game::Duration = 20 * 60
}else{
$Game::Duration = 00 * 00
}
but im not sure if ML_multiplayer is the correct call to use ,and im not sure how to right it in script.
thanks.
[edit]hmmm this may have something to do with it:
// Start the game timer
if ($Game::Duration)
$Game::Schedule = schedule($Game::Duration * 1000, 0, "onGameDurationEnd" );
$Game::Running = true;
}
ill play with it [/edit]