Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Two things im not sure how to do
serbusfish Offline
Member

Posts: 211
Threads: 75
Joined: Aug 2012
Reputation: 0
#1
Two things im not sure how to do

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
Find
7heDubz Offline
Posting Freak

Posts: 1,329
Threads: 40
Joined: Feb 2013
Reputation: 41
#2
RE: Two things im not sure how to do

(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

(This post was last modified: 03-07-2013, 05:24 PM by 7heDubz.)
03-07-2013, 05:15 PM
Find
darksky Offline
Member

Posts: 52
Threads: 8
Joined: Nov 2012
Reputation: 2
#3
RE: Two things im not sure how to do

for 2nd, you have to create a checkpoint.
then in the callback function you call the function ChangeMap().
03-07-2013, 05:20 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#4
RE: Two things im not sure how to do

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

Trying is the first step to success.
03-07-2013, 05:20 PM
Find
serbusfish Offline
Member

Posts: 211
Threads: 75
Joined: Aug 2012
Reputation: 0
#5
RE: Two things im not sure how to do

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)

03-07-2013, 06:06 PM
Find
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#6
RE: Two things im not sure how to do

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

(This post was last modified: 03-08-2013, 02:06 PM by Adrianis.)
03-08-2013, 02:04 PM
Find




Users browsing this thread: 1 Guest(s)