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
TC Mod editor is not updating enemy's
Millu30 Offline
Junior Member

Posts: 4
Threads: 1
Joined: Nov 2018
Reputation: 0
#1
Bug  TC Mod editor is not updating enemy's

So I was working on my TC mod and tried to add enemy that spawns when player enters script area
but problem is that my script does not work "unless I use F2 to reload whole map"


void OnStart()
{



//-- CallBacks --//
    {
    //-- Collide Callbacks --//
    AddEntityCollideCallback("Player", "NowWillFall", "objectsfall", true, 1);
    AddEntityCollideCallback("Player", "LetsSpawn", "spawnpig", true, 1);
    AddEntityCollideCallback("servant_grunt_1", "DespawnPig", "despawnpig", true, 1);
    
    
    }


    
SetMapDisplayNameEntry("Mansion - Employe District - Longue 2");

}
void OnEnter()
{    

    //AUTOSAVE//
    {
        AutoSave();
    }
}
void OnLeave()
{
    StopMusic(4.0f, 0);

}


                            //////////////////////////
                            ////Specyfic Functions///
                            /////////////////////////
void objectsfall (string &in asParent, string &in asChild, int alState)
    {
    SetEntityActive("buzzsaw_1", true);
    SetEntityActive("vase02_2", true);
    SetEntityActive("wine01_7", true);
    SetEntityActive("hammer_1", true);
    PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
    PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
    GiveSanityDamage(2, true);
    }
    
void spawnpig (string &in asParent, string &in asChild, int alState)
    {
    SetEntityActive("servant_grunt_1", true);
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0.001, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0.001, "");
    PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
    PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
    GiveSanityDamage(2, true);
    }
    
void despawnpig (string &in asParent, string &in asChild, int alState)
    {
    SetEntityActive("servant_grunt_1", false);
    }
11-26-2018, 10:37 PM
Find


Messages In This Thread
TC Mod editor is not updating enemy's - by Millu30 - 11-26-2018, 10:37 PM



Users browsing this thread: 1 Guest(s)