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
Where do I put this code? [SOLVED]
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#1
Where do I put this code? [SOLVED]

I mean this makes sense, I put the spawn enemy code inside the break door code! because when you unlock the door, i want an enemy to spawn and I made the code like this! it's right, right?

void BreakDoor(string &in asParent, string &in asChild, int alState)
{
    SetEntityActive("Joint", false);
    SetEntityActive("Broken", true);

    SetSwingDoorLocked("CrowbarDoor", false, false);
    SetSwingDoorClosed("CrowbarDoor", false, false);
    SetSwingDoorDisableAutoClose("CrowbarDoor", true);

    AddPropImpulse("CrowbarDoor", 0, 0, -3, "world");

    CreateParticleSystemAtEntity("", "ps_hit_wood.ps", "AreaEffect", false);
    PlaySoundAtEntity("", "break_wood_metal", "AreaEffect", 0, false);

    GiveSanityBoostSmall();

    SetEntityActive("Dog", true);
    AddEnemyPatrolNode("Dog", "Node_1",0.001f, "");
AddEnemyPatrolNode("Dog", "Node_4",0.001f, "");
AddEnemyPatrolNode("Dog", "Node_6",0.001f, "");
AddEnemyPatrolNode("Dog", "Node_10",0.001f, "");
AddEnemyPatrolNode("Dog", "Node_15",0.001f, "");
AddEnemyPatrolNode("Dog", "Node_18",0.001f, "");
AddEnemyPatrolNode("Dog", "Node_26",0.001f, "");

    AddTimer("",0.1,"TimerPushDoor");
}

I mean it gets me an error, then where am I supposed to add the spawn enemy code, i want it to function when you unlock/break the door!

am I supposed to add something in void on start because I didn't, but I think you don't have to!

don't tell me to add void onstart() because it's already there, I just copied this part only of the code
(This post was last modified: 03-02-2014, 08:13 PM by Radical Batz.)
03-02-2014, 07:27 PM
Find


Messages In This Thread
Where do I put this code? [SOLVED] - by Radical Batz - 03-02-2014, 07:27 PM
RE: Where do I put this code? - by Putmalk - 03-02-2014, 07:53 PM



Users browsing this thread: 2 Guest(s)