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
Monster De-Spawn Script
ObsidianLegion Offline
Member

Posts: 173
Threads: 53
Joined: Jun 2011
Reputation: 0
#1
Monster De-Spawn Script

How do I get a monster to de-spawn at a certain node?

Use these terms:
Monster= MyNameIsBob_1
Node for de-spawn= Node_7

Please help D:

"Good men mean well; they just don't always end up doing well." -Isaac Clarke, Dead Space 2, Chapter 12
08-23-2011, 04:03 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#2
RE: Monster De-Spawn Script

2 ways mostly.
a) When this is last node monster to be and wait time is over, it should disappear automatically. I think player can't be very close then or shouldn't see him.
b) script it ^^

The Interrogation
Chapter 1

My tutorials
08-23-2011, 04:05 PM
Find
ObsidianLegion Offline
Member

Posts: 173
Threads: 53
Joined: Jun 2011
Reputation: 0
#3
RE: Monster De-Spawn Script

(08-23-2011, 04:05 PM)Elven Wrote: 2 ways mostly.
a) When this is last node monster to be and wait time is over, it should disappear automatically. I think player can't be very close then or shouldn't see him.
b) script it ^^

Umm. I'm asking how you script it :LL

"Good men mean well; they just don't always end up doing well." -Isaac Clarke, Dead Space 2, Chapter 12
08-23-2011, 04:23 PM
Find
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#4
RE: Monster De-Spawn Script

Put a script area over the node. Then put an AddEntityCallback that checks for the grunt. If he crosses it, make him deactivate.
08-23-2011, 04:26 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#5
RE: Monster De-Spawn Script

Oh that is easy. Everything is in your bible

Create script area where ur last node point is. And name it for example "monsterdisappear".
Add this into ur OnStart

AddEntityCollideCallback("MyNameIsBob_1", "monsterdisappear", "makemedisappear", true, 1);

and separately:

void makemedisappear(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("MyNameIsBob_1, true/false); //true if u want to play sound effect and false if not.
SetEntityActive("MyNameIsBob_1, false); //Its up to you which one you use. Second one instantly deletes it. First one makes it go into smoke with effect ^^
}

The Interrogation
Chapter 1

My tutorials
(This post was last modified: 08-23-2011, 04:29 PM by Elven.)
08-23-2011, 04:28 PM
Find
ObsidianLegion Offline
Member

Posts: 173
Threads: 53
Joined: Jun 2011
Reputation: 0
#6
RE: Monster De-Spawn Script

(08-23-2011, 04:28 PM)Elven Wrote: Oh that is easy. Everything is in your bible

Create script area where ur last node point is. And name it for example "monsterdisappear".
Add this into ur OnStart

AddEntityCollideCallback("MyNameIsBob_1", "monsterdisappear", "makemedisappear", true, 1);

and separately:

void makemedisappear(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("MyNameIsBob_1, true/false); //true if u want to play sound effect and false if not.
SetEntityActive("MyNameIsBob_1, false); //Its up to you which one you use. Second one instantly deletes it. First one makes it go into smoke with effect ^^
}

But what if I activate the trigger while the monster isn't active?

"Good men mean well; they just don't always end up doing well." -Isaac Clarke, Dead Space 2, Chapter 12
08-23-2011, 04:50 PM
Find
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#7
RE: Monster De-Spawn Script

"MyNameIsBob_1" in AddEntityCollideCallback means that only the grunt will activate the script area, the player won't.
08-23-2011, 04:54 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#8
RE: Monster De-Spawn Script

Basically it works anyway, but only when grunt goes inside it happens. Since grunt isnt active, it cant go inside - aka it wont work ^^

The Interrogation
Chapter 1

My tutorials
08-23-2011, 06:00 PM
Find
BubbleTroll Offline
Junior Member

Posts: 30
Threads: 6
Joined: Aug 2011
Reputation: 0
#9
RE: Monster De-Spawn Script

Its like that the area is only going to activated when the grunt will walk/run into it.
bad part is if the player some how tricks the monster and runs behind the area and the monsters is chasing him his going to get deactivaded.
08-23-2011, 06:01 PM
Find




Users browsing this thread: 1 Guest(s)