Making a .cfg default 4 a map

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
M&M
General
Posts: 1427
Joined: Sun Sep 14, 2003 1:03 am
Location: egypt
Contact:

Making a .cfg default 4 a map

Post by M&M »

i have a few console commands that i want 2 make default on my map ,i lack any knowlege on how 2 make a .cfg in the 1st place ,im currently lookin 4 a tut and learning .what i want 2 do is adjust a few settings in ctf mode and keep them as default 4 this map ,instead of typing them each time.i also want them 2 run on other pcs than mine .
Image
kai0ty
Brigadier General
Posts: 507
Joined: Fri Mar 19, 2004 1:45 am

Post by kai0ty »

are u shipping it with a custom map, or n stock ones.
if with a custom map add in the .scr
exec myconfig.cfg
if its with stock maps i dont really know.
There are only 10 kinds of people in this world; those who know what binary is, and those who don't.
dcoshea
Colour Sergeant
Posts: 94
Joined: Thu Mar 04, 2004 3:00 am
Location: Sydney, Australia
Contact:

Post by dcoshea »

kai0ty wrote:are u shipping it with a custom map, or n stock ones.
if with a custom map add in the .scr
exec myconfig.cfg
if its with stock maps i dont really know.
If it's a stock map you can make your own mod of the .scr file which does the 'exec' :)

What type of settings are we talking about though? Are they the kind that need to be set back when you get to the next map?

Regards,
David
M&M
General
Posts: 1427
Joined: Sun Sep 14, 2003 1:03 am
Location: egypt
Contact:

Post by M&M »

in my map (custom map) im planning 2 add capture the flag support ,so i want 2 edit some commands .in mefy's ctf mode he has console commands that can change the settings ,ive asked there how 2 get them automated and they told me 2 make a .cfg file but i was wondering how 2 exec it everytime the map is run .i think i know now . (i thought exec was 4 .scr only)
Image
dcoshea
Colour Sergeant
Posts: 94
Joined: Thu Mar 04, 2004 3:00 am
Location: Sydney, Australia
Contact:

Post by dcoshea »

M&M wrote:in mefy's ctf mode he has console commands that can change the settings ,ive asked there how 2 get them automated and they told me 2 make a .cfg file but i was wondering how 2 exec it everytime the map is run .i think i know now . (i thought exec was 4 .scr only)
FYI, if the console commands are just setting variables, e.g.:

g_gametypestring "Capture The Flag"
g_teamdamage 1

you can set them via a map script like this:

setcvar "g_gametypestring" "Capture The Flag"
setcvar "g_teamdamage" 1

Regards,
David
M&M
General
Posts: 1427
Joined: Sun Sep 14, 2003 1:03 am
Location: egypt
Contact:

Post by M&M »

really? :shock: .cool ,that would be so much better than making a cfg file.tnx a dozen dcoshea :wink:
Image
Post Reply