Login x
User Name:
Social Links Facebook Twitter YouTube Steam RSS News Feeds
Watch MODSonair

Members Online

0 Active | 186 Guests


Mohaa maps on Cod2?
CoD2 MP Mapping
is this place alive?
CoDBO3 Mapping
Call of DutyŽ: WWII
CoD WW2 General


CoD Mapping
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Using your own keys in CoD Scripting
Versions: You must be logged in to view history.

bdbodger explains how it is done

Useing your own keys in cod is easy . Lets say you have this thread .
my_thing = getent ( "test","targetname");

if(isdefined ( mything.script_bodger))
iprintln mything.script_bodger;
iprintln " this does not work";


And you have a entity with the key: script_bodger and a value: ok_this_works

If you tried to run that it would not work why? The keys have to be declared .
You may have noticed that in pak4.pk3 there is a radiant directory and in
that directory there is a file called keys.txt . This is the file that declares
the keys used in the game . For example

// syntax:
// float floatVar
// int intVar
// string stringVar

float script_wait  // Used on patrol nodes to make patrollers wait the specified amount before continuing>>>>>>> 1.58
float script_additive_delay // Additive delay is the # of seconds extra a flood_spawner will wait for each additional spawning. Defaults to 1 second.
float script_delay  // Used as a substitute for delay_min/max.
float script_delay_min
int script_health
int script_health_easy
int script_ignoreme  // If this setting exists on a spawner this guy will have his .ignoreme set to true
string script_tree  // Additional variable for Stalingrad hill charge
string target
string targetname
string groupname

As you see there are 3 types of variables you can use for keys .float which is a decimal number, int which is or course a whole
number and string . So to use your own variables you need to make a txt file and place it in the radiant directory in your pak .
Don't name it keys.txt or you will overwrite the game keys .For this example I would make a txt file and name it mymap.txt and
this file will have this line in it

string script_bodger // this is my key

That is it just make sure the txt is in the radiant directory of your pak and your script will work

For example if you make a txt file and put it in the radiant directory and put this

string script_bodger

then yes you can use

my_thing = getent ( " this does not work","script_bodger");

and it will look for and find an entity with the key/script_bodger with a value of "this does not work" or in other words my_thing.script_bodger will be " this does not work" or

if(my_thing.script_bodger == "this does not work") will be true if you have made the txt file and put it in the radiant directory

Latest Syndicated News

Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends