Different scriping needed for FFA, DM & TDM?
Moderator: Moderators
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
Different scriping needed for FFA, DM & TDM?
Ive seen a lot of if ( gametype ) statements in basic dm levels scripts, are there any reasons to execute different scripts for different types of DM matches ( Free for all, Death match and Team deathmatch )?
Spearhead
He is talking about Spearhead scripts. They use the gametype number to make scripts that work in more than one type game--like TOW and DM.
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
Hey tltrude! U accusing me of beeing a spearhead mapper? Thats soooo low man!
No, I'm just talking regular FFA, DM, TDM matches in MOH:AA.
I'm not really a DM (any type) player, but I realize the simpicity in releasing DM versions of my OBJ maps.
So: if I set a DM map to be not respawning, should I change that for FFA and DM games?
No, I'm just talking regular FFA, DM, TDM matches in MOH:AA.
I'm not really a DM (any type) player, but I realize the simpicity in releasing DM versions of my OBJ maps.
So: if I set a DM map to be not respawning, should I change that for FFA and DM games?
FFA
Free for all requires a diffierent kind of player spawn point. Team Deathmatch, Round based, and Objective use the same ones. The host of the game sets the gameplay options. You only need two versions (dm and obj) of the script.
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
Code: Select all
// THE BRIDGE
// ARCHITECTURE: POWZER
// SCRIPTING: POWZER
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" "The Crossroads"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "mohdm4"
// call additional stuff for playing this map round based is needed
if(level.roundbased)
thread roundbasedthread
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
exec global/door_locked.scr::lock
level.script = maps/dm/mohdm4.scr
exec global/ambient.scr mohdm4
thread global/minefield.scr::minefield_setup
level waittill spawn
end
//-----------------------------------------------------------------------------
roundbasedthread:
// Can specify different scoreboard messages for round based games here.
level waitTill prespawn
level waittill spawn
// set the parameters for this round based match
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = kills // set to axis, allies, kills, or draw
level waittill roundstart
end
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
-
Krane
- Lieutenant General
- Posts: 782
- Joined: Sat May 31, 2003 4:18 pm
- Location: California, USA
- Contact:
I'll revive this old topic....but I refuse to believe it can't be done.
Ok, if you want something to run specific in round based games, you use if(level.roundbased)...But what should I use for DM? if(level.dmbased)?
And for TDM? if(level.teambased)?
if(level.????????)
roundbased = Round Based Match
??????????? = Team Death Match
??????????? = Death Match

Ok, if you want something to run specific in round based games, you use if(level.roundbased)...But what should I use for DM? if(level.dmbased)?
And for TDM? if(level.teambased)?
if(level.????????)
roundbased = Round Based Match
??????????? = Team Death Match
??????????? = Death Match
I found player.dmteam in the Game Module Classes. It returns 'allies', 'axis', 'spectator', or 'freeforall'.
So, if any player was used to check the game mode and he returned 'freeforall', wouldn't it be clear then, that this is not teamdeathmatch?
Hope that helps (oh how much I hope
)
edit
no, can't work. the turret told me so, because it's working in dm also were this player.dmteam is used.
So next question: When DOES it return freeforall? I only can see spectator/allied/axis...
So, if any player was used to check the game mode and he returned 'freeforall', wouldn't it be clear then, that this is not teamdeathmatch?
Hope that helps (oh how much I hope
edit
no, can't work. the turret told me so, because it's working in dm also were this player.dmteam is used.
So next question: When DOES it return freeforall? I only can see spectator/allied/axis...
never
It never returns ffa. That is old Quake stuff. Mohaa does not have a FFA team selection as it would require a "neutral" skin.
BUT.............
You can use the name of the gametype you are running with "(getcvar g_gametypestring)". Or, the gametype number with "(getcvar g_gametype)". In an FFA game, those will give the values "Free-For-All" and "1".
BTW Bjarne BZR, there is no game named "Death Match" in mohaa. Look at the mutiplayer game selection screen and you'll see the word "Death" is not there.
BUT.............
You can use the name of the gametype you are running with "(getcvar g_gametypestring)". Or, the gametype number with "(getcvar g_gametype)". In an FFA game, those will give the values "Free-For-All" and "1".
BTW Bjarne BZR, there is no game named "Death Match" in mohaa. Look at the mutiplayer game selection screen and you'll see the word "Death" is not there.
-
Krane
- Lieutenant General
- Posts: 782
- Joined: Sat May 31, 2003 4:18 pm
- Location: California, USA
- Contact:
Re: never
Hmm, so if I want to run a thread ONLY if the game is free-for-all, I should use:tltrude wrote: BUT.............
You can use the name of the gametype you are running with "(getcvar g_gametypestring)". Or, the gametype number with "(getcvar g_gametype)". In an FFA game, those will give the values "Free-For-All" and "1".
if((getcvar g_gametype) == 1)
{
my stuff here
}
end
...this thread will run only if the game in FFA?



