Frictional Games Forum (read-only)
[SCRIPT] Two things im not sure how to do - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] Two things im not sure how to do (/thread-20654.html)



Two things im not sure how to do - serbusfish - 03-07-2013

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?


RE: Two things im not sure how to do - 7heDubz - 03-07-2013

(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/amnesia/script_functions#game_scripts


RE: Two things im not sure how to do - darksky - 03-07-2013

for 2nd, you have to create a checkpoint.
then in the callback function you call the function ChangeMap().


RE: Two things im not sure how to do - FlawlessHappiness - 03-07-2013

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


RE: Two things im not sure how to do - serbusfish - 03-07-2013

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)


RE: Two things im not sure how to do - Adrianis - 03-08-2013

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/amnesia/script_functions#general1

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