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 walking paths
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#6
RE: Monster walking paths

(04-23-2011, 02:33 AM)Shoop Wrote: Thank you good sir, but at this path node 2 is that far away from the player? and will that make him vanish or do I gotta do a collide callback then a void entity false thing?

It doesn't matter if the path node is far away from the player or not, it depends what you want. Once the path nodes stop from going into the game, then it dissapears. For example:
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "SpawnMonsterFunction", true, 1);
}
void SpawnMonsterFunction(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Monster", true);
AddEnemyPatrolNode("Monster", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_3", 20, "");
AddEnemyPatrolNode("Monster", "PathNodeArea_4", 2, "");
}
The example script causes the Monster to spawn once the player collides with an area. Then the monster goes to path node 1 and waits there for 2 seconds. Then it moves to path node 2 and then goes to path node 3 without stopping. Then when it gets to path node 3, it stays where it is for 20 seconds. When 20 seconds past, it goes to path node 4 and from there waits for 2 seconds. Then it turns to dust and dissapears because it is the end of it's path. If the player is detected by the monster, it will move off it it's path and follow you. If it loses you, it doesn't look for you because it is not part of it's path.

04-23-2011, 02:47 AM
Find


Messages In This Thread
Monster walking paths - by Shoop - 04-23-2011, 02:05 AM
RE: Monster walking paths - by Kyle - 04-23-2011, 02:24 AM
RE: Monster walking paths - by Shoop - 04-23-2011, 02:33 AM
RE: Monster walking paths - by Kyle - 04-23-2011, 02:47 AM
RE: Monster walking paths - by Shoop - 04-23-2011, 02:50 AM
RE: Monster walking paths - by Kyle - 04-23-2011, 02:51 AM
RE: Monster walking paths - by Shoop - 04-23-2011, 02:53 AM
RE: Monster walking paths - by Kyle - 04-23-2011, 03:55 AM
RE: Monster walking paths - by Hunter of Shadows - 04-23-2011, 02:37 AM
RE: Monster walking paths - by Shoop - 04-23-2011, 02:39 AM
RE: Monster walking paths - by palistov - 04-23-2011, 03:25 AM
RE: Monster walking paths - by laser50 - 04-23-2011, 10:24 AM
RE: Monster walking paths - by MrBigzy - 04-23-2011, 02:47 PM



Users browsing this thread: 1 Guest(s)