Different scriping needed for FFA, DM & TDM?

Post your scripting questions / solutions here

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?

Post by Bjarne BZR »

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 )?
Admin .MAP Forums
Image
Head above heels.
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

you probably dont want a dm map that can end if a bomb blows up. :roll:
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Well, what's below the if (gametype) in those basic scripts? :wink:

I know only one reason and that is for roundbased, most dm scripts have a thread that disables respawning for roundbased matches. But, who plays roundbased games anyway :?
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Spearhead

Post by tltrude »

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.
Tom Trude,

Image
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Hey tltrude! U accusing me of beeing a spearhead mapper? Thats soooo low man! :wink:

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?
Admin .MAP Forums
Image
Head above heels.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

FFA

Post by tltrude »

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.
Tom Trude,

Image
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Yes tltrude, I am aware of the things you point out. I only want to know if there are any parameters / settings /commands that should differ in the scripting between FFA, DM and TDM matches ( is there a need for if statements checking the game type in a DM map )?
Admin .MAP Forums
Image
Head above heels.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

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
According to this script (from the crossroads) you only require a special section for roundbased games....
Image
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Yes, this is the thing I was fishing for...
Ahh, they dont set the level.dmrespawning at all unless its a roundbased game... makes sense.

Thanx
Admin .MAP Forums
Image
Head above heels.
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

Does rund based games have a roundstart event? I thought only objective games had that...
Admin .MAP Forums
Image
Head above heels.
Krane
Lieutenant General
Posts: 782
Joined: Sat May 31, 2003 4:18 pm
Location: California, USA
Contact:

Post by Krane »

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

:?: :?: :?: :?:
Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

Bjarne BZR wrote:Hey tltrude! U accusing me of beeing a spearhead mapper? Thats soooo low man! :wink:
hey!!!!
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

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 :wink: )

edit :cry:
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...
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

never

Post by tltrude »

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.
Tom Trude,

Image
Krane
Lieutenant General
Posts: 782
Joined: Sat May 31, 2003 4:18 pm
Location: California, USA
Contact:

Re: never

Post by Krane »

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".
Hmm, so if I want to run a thread ONLY if the game is free-for-all, I should use:

if((getcvar g_gametype) == 1)
{
my stuff here
}
end

...this thread will run only if the game in FFA?
Image
Post Reply