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
How do i make monster despawn after pathnodes
Putkimato Offline
Junior Member

Posts: 25
Threads: 8
Joined: Jun 2012
Reputation: 0
#1
How do i make monster despawn after pathnodes

void morzo(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("brute", true);
AddEnemyPatrolNode("brute", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("brute", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("brute", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("brute", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("brute", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("brute", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("brute", "PathNodeArea_8", 0, "");
SetMessage("Warnings", "Hide_1", 0);
}

How do i make monster dissapear after this?
(This post was last modified: 06-10-2012, 06:06 PM by Putkimato.)
06-10-2012, 03:02 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: How do i make monster despawn after pathnodes

Make a script area around the last pathnode and make it

void OnStart()
{
AddEntityCollideCallback("brute", "ScriptArea_1", "OnBruteCollide_1", true, 1);
}

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

Trying is the first step to success.
(This post was last modified: 06-10-2012, 03:10 PM by FlawlessHappiness.)
06-10-2012, 03:09 PM
Find




Users browsing this thread: 1 Guest(s)