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
PathNodes [SOLVED]
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#5
RE: PathNodes

(05-02-2011, 04:50 PM)Anxt Wrote:
(05-02-2011, 04:48 PM)Karai16 Wrote:
(05-02-2011, 04:31 PM)Roenlond Wrote: void zombieactive (string &in asParent , string &in asChild , int alState)
{
SetEntityActive("zombiee", true);
AddEnemyPatrolNode("zombiee", "zombiee2", 2, "");
AddEnemyPatrolNode("zombiee", "zombiee3", 0, "");
}

Once the function zombieactive is called, my monster called "zombiee" will be set to active and start walking to the pathnode "zombiee2", wait two seconds then move to the pathnode "zombiee3".

Okay, it works, but now there's another problem. The monster doesn't despawn after following the path, how do I do that?

Add another area for the monster to collide with. Then create a new function that is called when the monster enters it, which will SetEntityActive("monster", false);. You can also use FadeEnemyToSmoke if you want, I tend to use the latter because if the player is looking at the monster, it disappears like it was a hallucination rather than just vanishing instantly.

Precisely. I tend to use FadeEnemyToSmoke as well since it gives a much better looking disappearance. You typically use "Player" as the entity that should collide with a scriptarea, but in this case you will need to remember to change it to whatever you have named your monster.
05-02-2011, 05:14 PM
Find


Messages In This Thread
PathNodes [SOLVED] - by Karai16 - 05-02-2011, 04:25 PM
RE: PathNodes - by Roenlond - 05-02-2011, 04:31 PM
RE: PathNodes - by Karai16 - 05-02-2011, 04:48 PM
RE: PathNodes - by Anxt - 05-02-2011, 04:50 PM
RE: PathNodes - by Roenlond - 05-02-2011, 05:14 PM
RE: PathNodes - by Karai16 - 05-02-2011, 06:22 PM
RE: PathNodes - by Roenlond - 05-02-2011, 06:53 PM
RE: PathNodes - by Linus Ågren - 05-02-2011, 06:30 PM
RE: PathNodes - by Karai16 - 05-02-2011, 08:38 PM



Users browsing this thread: 3 Guest(s)