The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
I suck at scripting
Daktoa Offline
Member

Posts: 98
Threads: 10
Joined: Jul 2014
Reputation: 1
#1
I suck at scripting

I don't know what I'm doing.

I have 2 separate scripts for different monsters spawning when you enter different areas. The game crashes if they're both in the script, but if there's only one at a time it runs perfectly.

void OnStart()
{
    AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1);
}

void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
    AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 0.0001, "");
    AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_5", 0.0001, "");
    AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_10", 0.001, "");
    AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_13", 0.0001, "");
        AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_17", 0.0001, "");
    SetEntityActive("servant_brute_1", true);
}

void OnStart()

{
    AddEntityCollideCallback("Player", "PlayerCollide_2", "MonsterFunction", true, 1);
}

void MonsterFunction(string &in asParent, string &in asChild, int alState)
{
    AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_18", 5, "");

    AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_26", 0.0001, "");
    AddEnemyPatrolNode("servant_brute_2", "PathNodeArea_29", 0.0001, "");
    SetEntityActive("servant_brute_2", true);
}
07-28-2014, 04:16 AM
Find


Messages In This Thread
I suck at scripting - by Daktoa - 07-28-2014, 04:16 AM
RE: I suck at scripting - by Mudbill - 07-28-2014, 05:07 AM
RE: I suck at scripting - by Daktoa - 07-28-2014, 07:55 AM
RE: I suck at scripting - by Slanderous - 07-28-2014, 08:25 AM
RE: I suck at scripting - by Mudbill - 07-28-2014, 05:14 PM
RE: I suck at scripting - by CarnivorousJelly - 07-29-2014, 01:24 AM
RE: I suck at scripting - by TheGreatCthulhu - 07-29-2014, 03:15 PM
RE: I suck at scripting - by Mudbill - 07-29-2014, 06:08 PM
RE: I suck at scripting - by Daemian - 07-30-2014, 03:10 AM



Users browsing this thread: 1 Guest(s)