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

Members Online

»
1 Active | 28 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Tutorials

»
CoD Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Adding autosaves in SP
Versions: You must be logged in to view history.
Bodger2 is nice enough to explain how to add autosaves in SP maps

OK there are two methods for doing your autosaves.

Method 1: The easy way
Create a trigger once in your map,and give it the KEY:script_autosave VALUE:1 (this being the auto save number,1 2 3 4)
Thats it for the mapping part.

You need to have , maps\_load::main(); ,in your maps GSC file.

And if you want a picture in the load menu window,you need to put a dds image file in levelshots/autosave in your pak.
The file name must be autosave_yourmapname1.dds (1 being the save number)
EG:autosave_dawnville1.dds (look in pak5.pk3 levelshots/autosave for an example)

And thats it.

The only problem with this method is the you cann't add your own text to what is in the load menu.(IE:description of what point your at)
Darn those IW scripters

===================================================

Method 2: The not so hard way
This takes a little more work but,bit with this method you can get your own text description into the load menu window.

For this method you will have the create your own KEY.(script_gamesaver)
Script_gamesaver does not exist so that why we are creating are own.
In Pak4.pk3 there is a folder called radiant.In there is a txt file called keys.txt.
This contains all the keys used in COD.(IE:script_autosave)

So now we need to create are own txt file the same as they did.And put it in the radiant folder in your maps pk3.

In this case it would look like this:
int script_gamesaver

You can not use keys.txt because thats the name of the original COD file,and your new one could over ride it.You wouldn't want that.
And if you name it something that some one else has this could be a problem to.
So the safes way is to name it the same as your map name.Better safe than sorry.
So with that done save it as, mymapname.txt

Here's a link to my bro's tut on creating your own keys.It covers this in a little more depth. Bdbodger's Keys Tut

So this is how we apply are new KEY.

Create a trigger once in your map,and give it the KEY:script_gamesaver VALUE:1 (this being the auto save number,1 2 3 4)
Thats it for the mapping part.

Now the scripting part:

main()
{
         maps\_load::main();

         thread gamesaver();
}
//end of main body

//threads

gamesaver()
{
triggers = getentarray ("trigger_once","classname");

     for (i=0;i<triggers.size;i++)
    {

         if (isdefined (triggers[i].script_gamesaver))
              {
               num = triggers[i].script_gamesaver;
               thread names(triggers[i],num);
              }
    }
}

names(trigger,num)
{
               trigger waittill ("trigger");
               savedescription = &"TEST_BMW_GUYS_SAVE";//this is the default if no number exist

               if (num == 1)
                      savedescription = &"TEST_BMW_GUYS_SAVE1";
               if (num == 2)
                      savedescription = &"TEST_BMW_GUYS_SAVE2";
               if (num == 3)
                      savedescription = &"TEST_BMW_GUYS_SAVE3";

               imagename = "levelshots/autosave/autosave_" + level.script + num;
               println ("z:         imagename: ", imagename);
               level thread maps\_autosave::healthchecksave(num, savedescription, imagename);
}

TEST_BMW_GUYS is the STR file name.
SAVE1 is the reference name.

That takes care of the maps GSC file.

But we are using a localized strings(IE:&"TEST_BMW_GUYS_SAVE3") to get our text so we will need a .STR file for that.
So create a STR file for your map.And put it in localizedstrings/english folder in your pak.

Here an example of what that would look like:
//=============================

//VERSION"1"test_bmw_guys

REFERENCE SAVE
LANG_ENGLISH "Test BMW Guys"

REFERENCE SAVE1
LANG_ENGLISH "At the crossroads"

REFERENCE SAVE2
LANG_ENGLISH "Safehouse"

ENDMARKER
//===============================

SAVE would be the default if no save number exists.
COD already saves your map when you start it,so it will be your START number.

And if you want a picture in the load menu window,you need to put a dds image file in levelshots/autosave in your pak.
The file name must be autosave_yourmapname1.dds (1 being the save number)
EG:autosave_dawnville1.dds (look in pak5.pk3 levelshots/autosave for an example)
Or autosave_yourmapnamestart.dds for the level start picture.

Here's a link on how to do dds file DDS Tut

And thats it we now have text and pictures in are load menu.

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

»