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
Grunt Despawn Problem
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#1
Grunt Despawn Problem

I'm working very hard on my custom story, Castle Darkuan, and I have a kind of problem in one part of a map.

I have a room in which there's a crowbar, when the player picks it up, a 5 second timer is activated. When the timer is out, a grunt spawns and comes towards this room. I hate it in custom stories when the player is forced to get killed. I prefer it when the player must hide and wait for the grunt to disappear. I have it all setup, but there's one way to abuse it very hard.

The player can't pass the grunt after he is spawned, cause it's a very small / thin path and there's no room to run around the grunt. However it is possible to pass the grunt when he is inside the room, if he starts chasing the player, he will enter the despawn script area and disappear. I don't want him to disappear when he is chasing the player, or if the player is watching him.

Any tips on what I can do to prevent this?

Thanks in advance.

Current - Castle Darkuan
Other - F*cked Map
01-10-2012, 08:47 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#2
RE: Grunt Despawn Problem

Hmm, shouldn't just putting PathNodes everywhere in map solve this? This way he will always find his path back :/, as long he has path to follow (ordered path)...

The Interrogation
Chapter 1

My tutorials
01-10-2012, 08:49 PM
Find
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#3
RE: Grunt Despawn Problem

(01-10-2012, 08:49 PM)Elven Wrote: Hmm, shouldn't just putting PathNodes everywhere in map solve this? This way he will always find his path back :/, as long he has path to follow (ordered path)...
It's in a very narrow and linear path, most likely, everyone who will play the story seriously will not even try to pass him, it's quite difficult if you're gonna sneak, and it's impossible not to see that he is gone if he is chasing you out of the room. I want the player to stay in the room, but not by locking the door or forcing it by blocking the player.

Current - Castle Darkuan
Other - F*cked Map
01-10-2012, 08:52 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#4
RE: Grunt Despawn Problem

Can't you jut make them some kind of "room" in the midle of the passage so player can run and hide there for moment Wink? Else, your problem isn't about some other area? Just make the path notes out of that passage too when he chases you and this way he wont disappear if he looses you and should return to his routine...

The Interrogation
Chapter 1

My tutorials
01-10-2012, 08:56 PM
Find
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#5
RE: Grunt Despawn Problem

I really don't wanna show screenshots of my map yet but I guess it's the only way to show the situation properly:
(Click for full size)
[Image: VumeHl.jpg]

First off there are path nodes but they are just below the camera in the screenshot and I want him to walk straight right here.

So he enters the room (the door to the left) and I have another script area in that room which enables the despawn script area, cause otherwise he would despawn immediately. So, the player hides, he walks in the room, he walks out, despawns. However, if the player RUN OUT when he goes in, and the grunt starts chasing the player, he will despawn once he runs in the marked area.

What I would need is some way to disable the script area if the player is close.

And by typing this I just got an idea...if the player runs out of the room, I can make a script area which disables the grunts despawn area...

And I only know pretty basic scripting.

Current - Castle Darkuan
Other - F*cked Map
01-10-2012, 09:06 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#6
RE: Grunt Despawn Problem

Oh that is easy Big Grin...

Just don't put that despawn.

Grunt will disappear himself once his ordered pathnodes are finished and he isn't close to player.

In current case, grunt will go room and once he has been in room the X amount of time and leaves from that room and finishes outside the room next point, he will disappear. If player makes him chace, he will chase him down anyway till he looses him and then disappears after it Smile

The Interrogation
Chapter 1

My tutorials
01-10-2012, 09:16 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#7
RE: Grunt Despawn Problem

Set a Script area in front of the area that despawns the grunt and make it ACTIVE. Have this set so when the player collides with it, it DEACTIVATES the despawning area. This way, when the player runs out, it'll stop the grunt from disappearing. BUT, if the player doesn't run out, the grunt will pass the area, into the despawn one.

Also, safe-note: When the grunt despawns, even though the script area that collides with the player is active, it won't matter because the Grunt is already gone =]
01-10-2012, 09:18 PM
Find
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#8
RE: Grunt Despawn Problem

(01-10-2012, 09:16 PM)Elven Wrote: Oh that is easy Big Grin...

Just don't put that despawn.

Grunt will disappear himself once his ordered pathnodes are finished and he isn't close to player.

In current case, grunt will go room and once he has been in room the X amount of time and leaves from that room and finishes outside the room next point, he will disappear. If player makes him chace, he will chase him down anyway till he looses him and then disappears after it Smile
Really? I have played tons and tons of custom stories, and there have been so many where the enemies NEVER disappear and you are forced to be killed. I will try it though..


Current - Castle Darkuan
Other - F*cked Map
01-10-2012, 09:18 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#9
RE: Grunt Despawn Problem

(01-10-2012, 09:16 PM)Elven Wrote: Grunt will disappear himself once his ordered pathnodes are finished and he isn't close to player.

Not always true. What if the player follows behind the Grunt? And if he IS close to the Grunt, the grunt will loop those path nodes, not disappear.
(This post was last modified: 01-10-2012, 09:20 PM by Statyk.)
01-10-2012, 09:20 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#10
RE: Grunt Despawn Problem

Yes. Probably in these custom stories, grunt is jut too close to player. They wont disappear if they are too close, after all, it would be mad, if they disappear in front of player Tongue.

The Interrogation
Chapter 1

My tutorials
01-10-2012, 09:20 PM
Find




Users browsing this thread: 1 Guest(s)