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
Shoop Offline
Junior Member

Posts: 36
Threads: 10
Joined: Feb 2011
Reputation: 0
#7
RE: Monster walking paths

(04-23-2011, 02:47 AM)Kyle Wrote:
(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.

If it cannot find you after chasing you, does it go back on course or will it just stand there? Will it destroy doors in its way too? Also, look above and check mine please.
(This post was last modified: 04-23-2011, 02:51 AM by Shoop.)
04-23-2011, 02:50 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)