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
Level Editor Help Monster Path Help
eagledude4 Offline
Member

Posts: 144
Threads: 14
Joined: Dec 2011
Reputation: 0
#7
Solved - Please remove

(01-03-2012, 09:40 PM)Your Computer Wrote: Sounds like you have only 5 path nodes and expect the monster to find its way to the path nodes. Path nodes are used to help the monster navigate its way around. You're going to need more than 5 path nodes if you want the monster to move as expected.

Is this better?

[Image: pic3.png]

There are now 31 PathNodes instead of 5. The enemy still isn't following the paths correctly though.

void EnteredEnemyTriggerArea(string &in asParent, string &in asChild, int alState) {
    SetEntityActive("servant_grunt_1", true);
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
    if(GetEntitiesCollide("Player", "SonRoomArea") == true) {
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_10", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_12", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_14", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_15", 8, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_14", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_12", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_10", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, "");
    } else if(GetEntitiesCollide("Player", "DadRoomArea") == true) {
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_16", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_17", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_18", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_19", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_20", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_21", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_22", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_23", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_24", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_25", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_26", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_27", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_28", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_29", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_30", 8, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_29", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_28", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_27", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_26", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_25", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_24", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_23", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_22", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_21", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_19", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_18", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_17", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_16", 0, "");
    }
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_31", 0, "");
}




Its hard to see the truth when you've been blinded by lies.
(This post was last modified: 01-05-2012, 06:29 AM by eagledude4.)
01-05-2012, 12:29 AM
Find


Messages In This Thread
Monster Path Help - by eagledude4 - 01-02-2012, 03:50 AM
RE: Scripting a Monster chase - by Linus Ågren - 01-02-2012, 04:07 AM
RE: Scripting a Monster chase - by eagledude4 - 01-02-2012, 04:27 AM
RE: Scripting a Monster chase - by eagledude4 - 01-02-2012, 05:36 AM
RE: Scripting a Monster chase - by eagledude4 - 01-03-2012, 12:33 AM
RE: Scripting a Monster chase - by Your Computer - 01-03-2012, 09:40 PM
Solved - Please remove - by eagledude4 - 01-05-2012, 12:29 AM
RE: Monster Path Help - by Your Computer - 01-05-2012, 07:09 AM
RE: Monster Path Help - by eagledude4 - 01-05-2012, 06:06 PM
RE: Monster Path Help - by Your Computer - 01-05-2012, 09:49 PM
RE: Monster Path Help - by eagledude4 - 01-06-2012, 02:04 AM
RE: Monster Path Help - by Your Computer - 01-06-2012, 09:52 PM
RE: Monster Path Help - by eagledude4 - 01-11-2012, 10:17 PM
RE: Monster Path Help - by Statyk - 01-11-2012, 10:19 PM
RE: Monster Path Help - by eagledude4 - 01-11-2012, 10:22 PM
RE: Monster Path Help - by Statyk - 01-11-2012, 10:26 PM
RE: Monster Path Help - by eagledude4 - 01-11-2012, 10:30 PM
RE: Monster Path Help - by Statyk - 01-11-2012, 10:41 PM
RE: Monster Path Help - by eagledude4 - 01-11-2012, 10:42 PM
RE: Monster Path Help - by Statyk - 01-11-2012, 10:45 PM
RE: Monster Path Help - by eagledude4 - 01-11-2012, 10:48 PM
RE: Monster Path Help - by Statyk - 01-11-2012, 10:52 PM
RE: Monster Path Help - by eagledude4 - 01-11-2012, 10:53 PM
RE: Monster Path Help - by Statyk - 01-11-2012, 11:11 PM
RE: Monster Path Help - by eagledude4 - 01-11-2012, 11:13 PM
RE: Monster Path Help - by Statyk - 01-11-2012, 11:17 PM
RE: Monster Path Help - by eagledude4 - 01-11-2012, 11:20 PM
RE: Monster Path Help - by eagledude4 - 01-16-2012, 11:29 PM
RE: Monster Path Help - by Statyk - 01-17-2012, 12:00 AM
RE: Monster Path Help - by eagledude4 - 01-17-2012, 12:25 AM
RE: Monster Path Help - by Statyk - 01-17-2012, 02:27 AM
RE: Monster Path Help - by eagledude4 - 01-17-2012, 03:03 AM
RE: Monster Path Help - by Statyk - 01-17-2012, 04:13 AM



Users browsing this thread: 8 Guest(s)