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
Enemy "Disappears" on Death
iTech278 Offline
Junior Member

Posts: 5
Threads: 2
Joined: May 2012
Reputation: 0
#1
Question  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
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
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
Find
iTech278 Offline
Junior Member

Posts: 5
Threads: 2
Joined: May 2012
Reputation: 0
#3
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 Smile
05-26-2012, 05:42 AM
Find
FragdaddyXXL Offline
Member

Posts: 136
Threads: 20
Joined: Apr 2012
Reputation: 7
#4
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.

Dark Seclusion Here
05-26-2012, 08:08 AM
Find
iTech278 Offline
Junior Member

Posts: 5
Threads: 2
Joined: May 2012
Reputation: 0
#5
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 Undecided
(This post was last modified: 05-26-2012, 06:39 PM by iTech278.)
05-26-2012, 06:39 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#6
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
Find
iTech278 Offline
Junior Member

Posts: 5
Threads: 2
Joined: May 2012
Reputation: 0
#7
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
Find




Users browsing this thread: 1 Guest(s)