Frictional Games Forum (read-only)

Full Version: Two things im not sure how to do
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
First of all I know there is a script that makes the game forget what it has loaded in memory for use when you've entered a level and you dont need to return to earlier levels, anyone know what this is? Ive seen it a while ago but didnt write it down.

Also i was wondering is it possible to make the map change if an enemy kills you? Or can map changing only be done via level doors?
(03-07-2013, 05:01 PM)serbusfish Wrote: [ -> ]First of all I know there is a script that makes the game forget what it has loaded in memory for use when you've entered a level and you dont need to return to earlier levels, anyone know what this is? Ive seen it a while ago but didnt write it down.

Also i was wondering is it possible to make the map change if an enemy kills you? Or can map changing only be done via level doors?

1st Problem
void CreateDataCache();
void DestroyDataCache();

I belive this is what you were talking about.

2nd. Problem
Listen to the guys below me.

Hope i helped you out!

http://wiki.frictionalgames.com/hpl2/amn...me_scripts
for 2nd, you have to create a checkpoint.
then in the callback function you call the function ChangeMap().
For second problem i would set up a Checkpoint. In this checkpoint you specify a callback, where you call the function ChangeMap.

You can change map by the script with ChangeMap
Ok thanks a lot guys, i'd be lost without your advice! (and dont worry, im making a note of all your usernames for my CS end credits Smile)
For the first one...

"ClearSavedMaps();
Clears the “history” of the save, useful to do when you know the player will not be able to go back anymore. Makes the next save much smaller in size."
http://wiki.frictionalgames.com/hpl2/amn...s#general1

Although the way you worded the question may mean that create/destroy cache could be useful as well, as WIWWM suggests