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
Area Dissapears after use
Shives Offline
Member

Posts: 154
Threads: 41
Joined: Jan 2012
Reputation: 1
#1
Area Dissapears after use

Hi
I want to make a waterlurker,everything works but when the waterlurker kills me is the Area dissapeared and the waterlurker appears no more. What i have to do that the waterlurker appears again?

(Sorry for bad English Big Grin )

My Custom Story
http://www.frictionalgames.com/forum/thread-12587.html

Sorry for bad English


02-05-2012, 06:03 PM
Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#2
RE: Area Dissapears after use

I'm not too sure on this, but you can try adding
CreateDataCache();
to your .hps. It's supposed to cache all of the textures and models until you tell it to destroy them.


Ba-da bing, ba-da boom.
02-05-2012, 06:47 PM
Find
Shives Offline
Member

Posts: 154
Threads: 41
Joined: Jan 2012
Reputation: 1
#3
RE: Area Dissapears after use

(02-05-2012, 06:47 PM)JenniferOrange Wrote: I'm not too sure on this, but you can try adding
CreateDataCache();
to your .hps. It's supposed to cache all of the textures and models until you tell it to destroy them.
The Result
Fatal Error
.............................
...........................
main (7,17):Area_1'is not declared
The Script:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "Area_1", "Waterlurker", true, 9);
AddUseItemCallback("", "Hammer", "Gate", "Kaputt", true);
CreateDataCache(Area_1);
}
void Waterlurker(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("waterlurker_1", true);
}
void Kaputt(string &in asItem, string &in asEntity)
{
SetEntityActive("Kaputt", true);
SetEntityActive("Gate", false);
SetEntityActive("Box", false);
PlaySoundAtEntity("", "break_wood_metal3.snt", "Player", 0, false);
}
////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()




My Custom Story
http://www.frictionalgames.com/forum/thread-12587.html

Sorry for bad English


02-05-2012, 07:01 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#4
RE: Area Dissapears after use

(02-05-2012, 07:01 PM)Shives Wrote:
(02-05-2012, 06:47 PM)JenniferOrange Wrote: I'm not too sure on this, but you can try adding
CreateDataCache();
to your .hps. It's supposed to cache all of the textures and models until you tell it to destroy them.
The Result
Fatal Error
.............................
...........................
main (7,17):Area_1'is not declared
The Script:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "Area_1", "Waterlurker", true, 9);
AddUseItemCallback("", "Hammer", "Gate", "Kaputt", true);
CreateDataCache(Area_1);
}
void Waterlurker(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("waterlurker_1", true);
}
void Kaputt(string &in asItem, string &in asEntity)
{
SetEntityActive("Kaputt", true);
SetEntityActive("Gate", false);
SetEntityActive("Box", false);
PlaySoundAtEntity("", "break_wood_metal3.snt", "Player", 0, false);
}
////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
CreateDataCache(Area_1);

should be

CreateDataCache();



02-05-2012, 08:10 PM
Find
Shives Offline
Member

Posts: 154
Threads: 41
Joined: Jan 2012
Reputation: 1
#5
RE: Area Dissapears after use

It doesn't works
The game is no more Crashing but on the second try nothing happens Sad

My Custom Story
http://www.frictionalgames.com/forum/thread-12587.html

Sorry for bad English


02-05-2012, 08:24 PM
Find
Ninami Offline
Member

Posts: 59
Threads: 6
Joined: Feb 2012
Reputation: 2
#6
RE: Area Dissapears after use

Can you post your script? Easier to help Smile

EDIT: Nevermind I saw you posted it before xD
AddEntityCollideCallback("Player", "Area_1", "Waterlurker", true, 9);
You should change the "true" to "false".
Because right now you're saying true to: "delete callback when used" you want that to be false.
(This post was last modified: 02-05-2012, 09:10 PM by Ninami.)
02-05-2012, 09:05 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#7
RE: Area Dissapears after use

It's not that the area is disappearing, it's that monsters disappear when they kill the player and can't be respawned. Therefore trying to re-activate the monster that killed the player isn't going to work. You have to dynamically create the monster or have it pre-exist in the level editor.

Tutorials: From Noob to Pro
02-05-2012, 11:07 PM
Website Find
Ninami Offline
Member

Posts: 59
Threads: 6
Joined: Feb 2012
Reputation: 2
#8
RE: Area Dissapears after use

Oh I understood it as if the area disappeared and wouldn't work again. My bad
02-05-2012, 11:29 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#9
RE: Area Dissapears after use

(02-05-2012, 11:29 PM)Ninami Wrote: Oh I understood it as if the area disappeared and wouldn't work again. My bad

Well, he should also consider passing in false for AddEntityCollideCallback in either case.

Tutorials: From Noob to Pro
02-05-2012, 11:51 PM
Website Find
Shives Offline
Member

Posts: 154
Threads: 41
Joined: Jan 2012
Reputation: 1
#10
RE: Area Dissapears after use

It doesn't work
Nothing happens


My Custom Story
http://www.frictionalgames.com/forum/thread-12587.html

Sorry for bad English


02-07-2012, 01:04 PM
Find




Users browsing this thread: 1 Guest(s)