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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help With a Monster
Marche100 Offline
Junior Member

Posts: 18
Threads: 3
Joined: Aug 2011
Reputation: 0
#1
Help With a Monster

Alright, I just started making my own custom story in Amnesia today, so forgive me if this sounds noobish, because it probably is. I'll post up some pictures to help along my explanation.

Picture is in spoilers because it's big.

Spoiler below!
[Image: monsterhelp1.png]

Ok, so here's the situation. In the beginning of my story you go through that hallway, and the door with the monster inside it is locked. Then you head over to the room on the left and grab the lantern over where that 'area' box is. Then the monster spawns once you grab it, it breaks down the door to get out of its room, and it comes running along the line of node paths I set. You hide in the closet to wait while the monster leaves, then.

Everything goes perfectly until after the monster leaves. When the monster is done going around the node path, it just sort of hangs around and does nothing. It doesn't despawn. It usually heads back into the hallway to wait around, but occasionally it'll wait around in the room to the left, as well. I'm not sure why, but I want it to despawn, because otherwise you can't continue on through the story.

Any ideas on why it isn't despawning?
08-20-2011, 09:20 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Help With a Monster

I think you're going to have make the monster walk away further across the hall. The monster has pretty good range by default, so the game might think it is not far away enough from the player.

Tutorials: From Noob to Pro
08-20-2011, 09:56 PM
Website Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#3
RE: Help With a Monster

You could always manually via scripting make it disappear. For example when monster enters area and Player is still in its room, then make it disappear?

The Interrogation
Chapter 1

My tutorials
08-20-2011, 10:15 PM
Find
Marche100 Offline
Junior Member

Posts: 18
Threads: 3
Joined: Aug 2011
Reputation: 0
#4
RE: Help With a Monster

(08-20-2011, 09:56 PM)Your Computer Wrote: I think you're going to have make the monster walk away further across the hall. The monster has pretty good range by default, so the game might think it is not far away enough from the player.

I did this...

Spoiler below!
[Image: monsterhelp2.png]

...so that he runs over to the room on the left and then he turns around and continues back out the door, down the hall, and into the other room so he can despawn, but he refuses to go back down the hall. He still just hangs around the doorway between the room on the left and hallway.

Or do you mean something else by have him walk away further across the hall?

And how would I make the monster disappear via scripting? I tried adding some stuff at the end of the big thing of "add enemy patrol nodes" but it just ends up crashing.
(This post was last modified: 08-20-2011, 10:20 PM by Marche100.)
08-20-2011, 10:19 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#5
RE: Help With a Monster

I hope you know at least basic scripting. If you do then basically use this way. For example you name your monster as "monster" and you create area where monster must stand in the end as "monsterStand" (script area). Then onStart() you put:

void AddEntityCollideCallback("monster", "monsterStand", "monsterDelete", true, 0);

And then below you put:

void monsterDelete(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("monster", false);
}

This would be easiest method to force it to disappear Smile

The Interrogation
Chapter 1

My tutorials
08-20-2011, 10:39 PM
Find
Marche100 Offline
Junior Member

Posts: 18
Threads: 3
Joined: Aug 2011
Reputation: 0
#6
RE: Help With a Monster

(08-20-2011, 10:39 PM)Elven Wrote: I hope you know at least basic scripting. If you do then basically use this way. For example you name your monster as "monster" and you create area where monster must stand in the end as "monsterStand" (script area). Then onStart() you put:

void AddEntityCollideCallback("monster", "monsterStand", "monsterDelete", true, 0);

And then below you put:

void monsterDelete(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("monster", false);
}

This would be easiest method to force it to disappear Smile

That would delete the monster as soon as he comes near the closet, though, assuming that I put the area near the closet, which would be the most logical place to put it.. I want him to at least stand around a little bit there in case the player would be stupid enough to stand outside the closet so that the monster could maul him.

Is there a way I could do that, or am I wrong in what I said above and it would work out the way I want it to?

I'll try it first, though, just so I give it a shot and see how it works out. I do know how to implement something that basic, thankfully. Tongue

Edit: Ok, I tried your method, and it's good and it works fine, but I'm having a bit of trouble making it go exactly the way I want it to. I'm trying to get it so that even if you flatten yourself against the closet the monster won't disappear and can kill you, but if you go into the closet he'll disappear with 100% certainty. I'm still working on it though, so I'll try to make the area box a bit bigger in the meantime.

(This post was last modified: 08-20-2011, 11:09 PM by Marche100.)
08-20-2011, 10:53 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#7
RE: Help With a Monster

Just make path nodes longer. When you at PathNode, then at front of closet put longer time how long he will stand there:

AddEnemyPatrolNode("", "FrontOfCloset", 10, "");

notice that bold is time how long he gonna wait at that patrol node. Then after 10 seconds he will go to next node and you can put area there and make him disappear there.

The Interrogation
Chapter 1

My tutorials
08-20-2011, 10:57 PM
Find
Marche100 Offline
Junior Member

Posts: 18
Threads: 3
Joined: Aug 2011
Reputation: 0
#8
RE: Help With a Monster

(08-20-2011, 10:57 PM)Elven Wrote: Just make path nodes longer. When you at PathNode, then at front of closet put longer time how long he will stand there:

AddEnemyPatrolNode("", "FrontOfCloset", 10, "");

notice that bold is time how long he gonna wait at that patrol node. Then after 10 seconds he will go to next node and you can put area there and make him disappear there.

The only problem with that is that the place where the closet is and where the path of nodes end is a dead end, so there are no more nodes to place. Even if I were to put an area somewhere that he would definitely return to (because he just loves randomly hanging around the room) it would just erase him the first time he walked through it, which would stop him from reaching the closet.

I'm still trying out your first method, and that seems to be the best thing so far, but it's not perfect (sometimes it works flawlessly and he enters the erase area, sometimes it doesn't), so if you have anything else, feel free to say so.

By the way, thanks ahead of time for all your help. This could very well help me with every enemy I put into the game, and otherwise I might have had to make this enemy a hallucination, which wouldn't be as fun.

(This post was last modified: 08-20-2011, 11:13 PM by Marche100.)
08-20-2011, 11:12 PM
Find
Rownbear Offline
Member

Posts: 157
Threads: 13
Joined: Apr 2011
Reputation: 2
#9
RE: Help With a Monster

You could use a timer, so after about 20 seconds he despawn, depends how far away you want him to walk until the timer goes off.

Or you can put like they said a removemonster script box he walks into to disappear. BUT you put the removemonster scriptbox unactive and another script box which enables the removemonster scriptbox further inside the room. So he walks through the removemonster script which is unactive and then through the scriptbox that activates it. when he walks out the hall the removescriptbox will be enabled and he's gone. Hope it didnt get too confusing.

08-20-2011, 11:26 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#10
RE: Help With a Monster

You sure you put pathnodes and ordered monster to follow them via scripting?

The Interrogation
Chapter 1

My tutorials
(This post was last modified: 08-20-2011, 11:31 PM by Elven.)
08-20-2011, 11:31 PM
Find




Users browsing this thread: 1 Guest(s)