iTech278
Junior Member
Posts: 5
Threads: 2
Joined: May 2012
Reputation:
0
|
Enemy "Disappears" on Death
Hello everyone!
I'm trying my hand at making a custom story for Amnesia, and everything works...mostly. I have one problem where if I go to the map with a water lurker in it, if it kills me it will not be there when I respawn. How can I fix this? Also, I have one more issue where I have an area set to make an entity active and play a sound when the player walks into it, and if I go to a different map and then back, the entity is still there, but the sound plays again if I walk into the area; this problem is not seen if I don't leave the map (the area deletes itself like it should).
Thanks to anyone that can help!
(This post was last modified: 05-26-2012, 07:37 PM by iTech278.)
|
|
05-26-2012, 05:30 AM |
|
Adny
Posting Freak
Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation:
173
|
RE: Enemy "Disappears" on Death
When you add the checkpoint (which you should definitely have if the player can die soon, especially at a monster) the function allows you to call another function when you die. You can use that to reset the water lurker by calling the original a new function with the callback syntax below:
CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);
Callback syntax: void MyFunc(string &in asName, int alCount)
Sorry, but I can't help you with the second part of your problem because I'm not 100% sure if I understand what you're asking.
I rate it 3 memes.
|
|
05-26-2012, 05:35 AM |
|
iTech278
Junior Member
Posts: 5
Threads: 2
Joined: May 2012
Reputation:
0
|
RE: Enemy "Disappears" on Death
(05-26-2012, 05:35 AM)andyrockin123 Wrote: When you add the checkpoint (which you should definitely have if the player can die soon, especially at a monster) the function allows you to call another function when you die. You can use that to reset the water lurker by calling the original a new function with the callback syntax below:
CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);
Callback syntax: void MyFunc(string &in asName, int alCount)
Sorry, but I can't help you with the second part of your problem because I'm not 100% sure if I understand what you're asking. Okay, thanks! I'll try that tomorrow; it's almost 1 AM here, and I'm tired
|
|
05-26-2012, 05:42 AM |
|
FragdaddyXXL
Member
Posts: 136
Threads: 20
Joined: Apr 2012
Reputation:
7
|
RE: Enemy "Disappears" on Death
(05-26-2012, 05:30 AM)iTech278 Wrote: Also, I have one more issue where I have an area set to make an entity active and play a sound when the player walks into it, and if I go to a different map and then back, the entity is still there, but the sound plays again if I walk into the area; this problem is not seen if I don't leave the map (the area deletes itself like it should). Did you place the callback for that area in OnEnter()? If it is, place the callback in OnStart() instead.
If you really want it foolproof, create the callback after the player does something (pick up a key, etc.) and have that something be only done once. This may or may not be possible for your situation.
|
|
05-26-2012, 08:08 AM |
|
iTech278
Junior Member
Posts: 5
Threads: 2
Joined: May 2012
Reputation:
0
|
RE: Enemy "Disappears" on Death
(05-26-2012, 05:35 AM)andyrockin123 Wrote: When you add the checkpoint (which you should definitely have if the player can die soon, especially at a monster) the function allows you to call another function when you die. Okay...would I reset the water lurker by putting this in the function called on death?
SetEntityActive("SewerMonster", true);
I don't think that's right as it didn't work, so what should I call? Sorry, I'm new to this
(This post was last modified: 05-26-2012, 06:39 PM by iTech278.)
|
|
05-26-2012, 06:39 PM |
|
SilentStriker
Posting Freak
Posts: 950
Threads: 26
Joined: Jul 2011
Reputation:
43
|
RE: Enemy "Disappears" on Death
If I'm not mistaken you need more waterlurkers since you can't respawn the first lurker. so you need another one that is inactive untill it's activated through the checkpoint callback
(This post was last modified: 05-26-2012, 08:08 PM by SilentStriker.)
|
|
05-26-2012, 06:55 PM |
|
iTech278
Junior Member
Posts: 5
Threads: 2
Joined: May 2012
Reputation:
0
|
RE: Enemy "Disappears" on Death
(05-26-2012, 06:55 PM)SilentStriker Wrote: If I'm not mistaken you need more waterlurkers since you can respawn the first lurker. so you need another one that is inactive untill it's activated through the checkpoint callback Thanks, that worked!
|
|
05-26-2012, 07:37 PM |
|
|