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 stop at path node
xtron Offline
Senior Member

Posts: 402
Threads: 37
Joined: May 2011
Reputation: 2
#1
Monster stop at path node

void OnStart()
{
AddEntityCollideCallback("monster_outside_door_slam1", "PathNodeArea_10", "disable_monster1", true, 1);
}

void disable_monster1(string &in asParent, string &in asChild, int alState)
{
SetEnemyDisabled("monster_outside_door_slam1", true);
}

Here's my current code for monster geting disabled when on "PathNodeArea_10" but it doesn't work. Any ides why?

Monster name: monster_outside_door_slam1
Node name: PathNodeArea_10

[Image: 44917299.jpg]Dubstep <3
05-26-2011, 06:58 PM
Find
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#2
RE: Monster stop at path node

change the node into a large script area and it should be okay?
05-26-2011, 07:01 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#3
RE: Monster stop at path node

Yeah, what Khyrpa said.

Add a ScriptArea at PathNodeArea_10.

void OnStart()
{
     AddEntityCollideCallback("monster_outside_door_slam1", "ScriptArea_1", "disable_monster1", true, 1);
}
void disable_monster1(string &in asParent, string &in asChild, int alState)
{
     SetEnemyDisabled("monster_outside_door_slam1", true);
}

05-26-2011, 07:08 PM
Find
xtron Offline
Senior Member

Posts: 402
Threads: 37
Joined: May 2011
Reputation: 2
#4
RE: Monster stop at path node

How do i do so the monster disapears when the player reaches another script?


EDIT: NVM! I figgured it out.

EDIT2:
void OnStart()
{
AddEntityCollideCallback("Player", "script_make_monster_smoke1", "make_monster_smoke1", true, 1);
}

void make_monster_smoke1(string &in asParent, string &in asChild, int alState)
{
     FadeEnemyToSmoke("script_make_monster_smoke1", false);
}

Is this gonna work?

[Image: 44917299.jpg]Dubstep <3
(This post was last modified: 05-26-2011, 07:38 PM by xtron.)
05-26-2011, 07:33 PM
Find
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#5
RE: Monster stop at path node

oh... you have to make the boolean into true for the monster to fadetosmoke
(This post was last modified: 05-26-2011, 07:39 PM by Khyrpa.)
05-26-2011, 07:39 PM
Find
xtron Offline
Senior Member

Posts: 402
Threads: 37
Joined: May 2011
Reputation: 2
#6
RE: Monster stop at path node

(05-26-2011, 07:39 PM)Khyrpa Wrote: oh... you have to make the boolean into true for the monster to fadetosmoke

Oh I thought that "fadetosmoke" was that the sound "fadetosmoke" was gonna happen. But thanks ^^.

[Image: 44917299.jpg]Dubstep <3
05-26-2011, 07:43 PM
Find
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#7
RE: Monster stop at path node

ops... yes it actually is just for the sound! sorry... mybad keep it false if you dont want the sound
05-26-2011, 07:48 PM
Find




Users browsing this thread: 1 Guest(s)