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
Pathnode help
ObsidianLegion Offline
Member

Posts: 173
Threads: 53
Joined: Jun 2011
Reputation: 0
#1
Pathnode help

How do I make my monster disappear after it reaches a certain node?
I've tried filling in the last thread and making

For exapmle

void OnStart()
{
AddEnemyPatrolNode("Monster", "Node_1", 2, "");
AddEnemyPatrolNode("Monster", "Node_2", 2, "");
AddEnemyPatrolNode("Monster", "Node_3", 2, "");
AddEnemyPatrolNode("Monster", "Node_4", 2, "");
AddEnemyPatrolNode("Monster", "Node_5", 2, "");
AddEnemyPatrolNode("Monster", "Node_6", 2, "");
AddEnemyPatrolNode("Monster", "Node_7", 2, "MyFunc");
}


void MyFunc(string& asEntity)
{
SetEnemyDisabled("Monster", true);
}

They don't seem to work. Maybe I'm using a faulty function? Or I'm simply not putting the correct thing in that box

Please help

"Good men mean well; they just don't always end up doing well." -Isaac Clarke, Dead Space 2, Chapter 12
(This post was last modified: 08-09-2011, 01:27 PM by ObsidianLegion.)
08-09-2011, 01:24 PM
Find
HumiliatioN Offline
Posting Freak

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#2
RE: Pathnode help

(08-09-2011, 01:24 PM)Lolnesia09 Wrote: How do I make my monster disappear after it reaches a certain node?
I've tried filling in the last thread and making

For exapmle

void OnStart()
{
AddEnemyPatrolNode("Monster", "Node_1", 2, "");
AddEnemyPatrolNode("Monster", "Node_2", 2, "");
AddEnemyPatrolNode("Monster", "Node_3", 2, "");
AddEnemyPatrolNode("Monster", "Node_4", 2, "");
AddEnemyPatrolNode("Monster", "Node_5", 2, "");
AddEnemyPatrolNode("Monster", "Node_6", 2, "");
AddEnemyPatrolNode("Monster", "Node_7", 2, "MyFunc");
}


void MyFunc(string& asEntity)
{
SetEnemyDisabled("Monster", true);
}

They don't seem to work. Maybe I'm using a faulty function? Or I'm simply not putting the correct thing in that box

Please help

You dont have timers here. Here use this definitely works.

void OnStart()
{
AddEntityCollideCallback("Player", "Closetbrute", "Closet_brute", true, 1);
}

void Closet_brute(string &in asParent, string &in asChild, int alState)
{
AddEnemyPatrolNode("Monster", "Node_1", 2, "");
AddEnemyPatrolNode("Monster", "Node_2", 2, "");
AddEnemyPatrolNode("Monster", "Node_3", 2, "");
AddEnemyPatrolNode("Monster", "Node_4", 2, "");
AddEnemyPatrolNode("Monster", "Node_5", 2, "");
AddEnemyPatrolNode("Monster", "Node_6", 2, "");
AddTimer("", 30.0, "DissapearingMonster");
}

void DissapearingMonster(string &in asTimer)
{
SetEntityActive("Monster", false);
}


This is my example. Try it and remember to name "Areas and monster right" Smile

“Life is a game, play it”
08-09-2011, 01:40 PM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#3
RE: Pathnode help

Add a scriptarea at the last patrolnode. Set it to only affect the certain monster. Use the command
SetEntityActive to deactivate the monster in that area.

[Image: mZiYnxe.png]


08-09-2011, 01:43 PM
Find
ObsidianLegion Offline
Member

Posts: 173
Threads: 53
Joined: Jun 2011
Reputation: 0
#4
RE: Pathnode help

(08-09-2011, 01:40 PM)HumiliatioN Wrote:
(08-09-2011, 01:24 PM)Lolnesia09 Wrote: How do I make my monster disappear after it reaches a certain node?
I've tried filling in the last thread and making

For exapmle

void OnStart()
{
AddEnemyPatrolNode("Monster", "Node_1", 2, "");
AddEnemyPatrolNode("Monster", "Node_2", 2, "");
AddEnemyPatrolNode("Monster", "Node_3", 2, "");
AddEnemyPatrolNode("Monster", "Node_4", 2, "");
AddEnemyPatrolNode("Monster", "Node_5", 2, "");
AddEnemyPatrolNode("Monster", "Node_6", 2, "");
AddEnemyPatrolNode("Monster", "Node_7", 2, "MyFunc");
}


void MyFunc(string& asEntity)
{
SetEnemyDisabled("Monster", true);
}

They don't seem to work. Maybe I'm using a faulty function? Or I'm simply not putting the correct thing in that box

Please help

You dont have timers here. Here use this definitely works.

void OnStart()
{
AddEntityCollideCallback("Player", "Closetbrute", "Closet_brute", true, 1);
}

void Closet_brute(string &in asParent, string &in asChild, int alState)
{
AddEnemyPatrolNode("Monster", "Node_1", 2, "");
AddEnemyPatrolNode("Monster", "Node_2", 2, "");
AddEnemyPatrolNode("Monster", "Node_3", 2, "");
AddEnemyPatrolNode("Monster", "Node_4", 2, "");
AddEnemyPatrolNode("Monster", "Node_5", 2, "");
AddEnemyPatrolNode("Monster", "Node_6", 2, "");
AddTimer("", 30.0, "DissapearingMonster");
}

void DissapearingMonster(string &in asTimer)
{
SetEntityActive("Monster", false);
}


This is my example. Try it and remember to name "Areas and monster right" Smile

Cheers (:

What's the script where lights turn off with the sounds and screen effects Etc.?

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

Posts: 1,179
Threads: 64
Joined: Dec 2010
Reputation: 18
#5
RE: Pathnode help

(08-09-2011, 02:52 PM)Lolnesia09 Wrote:
(08-09-2011, 01:40 PM)HumiliatioN Wrote:
(08-09-2011, 01:24 PM)Lolnesia09 Wrote: How do I make my monster disappear after it reaches a certain node?
I've tried filling in the last thread and making

For exapmle

void OnStart()
{
AddEnemyPatrolNode("Monster", "Node_1", 2, "");
AddEnemyPatrolNode("Monster", "Node_2", 2, "");
AddEnemyPatrolNode("Monster", "Node_3", 2, "");
AddEnemyPatrolNode("Monster", "Node_4", 2, "");
AddEnemyPatrolNode("Monster", "Node_5", 2, "");
AddEnemyPatrolNode("Monster", "Node_6", 2, "");
AddEnemyPatrolNode("Monster", "Node_7", 2, "MyFunc");
}


void MyFunc(string& asEntity)
{
SetEnemyDisabled("Monster", true);
}

They don't seem to work. Maybe I'm using a faulty function? Or I'm simply not putting the correct thing in that box

Please help

You dont have timers here. Here use this definitely works.

void OnStart()
{
AddEntityCollideCallback("Player", "Closetbrute", "Closet_brute", true, 1);
}

void Closet_brute(string &in asParent, string &in asChild, int alState)
{
AddEnemyPatrolNode("Monster", "Node_1", 2, "");
AddEnemyPatrolNode("Monster", "Node_2", 2, "");
AddEnemyPatrolNode("Monster", "Node_3", 2, "");
AddEnemyPatrolNode("Monster", "Node_4", 2, "");
AddEnemyPatrolNode("Monster", "Node_5", 2, "");
AddEnemyPatrolNode("Monster", "Node_6", 2, "");
AddTimer("", 30.0, "DissapearingMonster");
}

void DissapearingMonster(string &in asTimer)
{
SetEntityActive("Monster", false);
}


This is my example. Try it and remember to name "Areas and monster right" Smile

Cheers (:

What's the script where lights turn off with the sounds and screen effects Etc.?

SetLampLit("hanging_lantern_ceiling_1", true, true); Example. for lights.

StopMusic(2,0); for stopping music.

ChangePlayerStateToNormal(); this one I think change everything normal.


“Life is a game, play it”
08-09-2011, 05:08 PM
Find




Users browsing this thread: 2 Guest(s)