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
Putmalk Offline
Senior Member

Posts: 290
Threads: 13
Joined: Apr 2012
Reputation: 15
#2
RE: Where do I put this code?

What error are you receiving? What is happening vs. desired effects? Post the entire code, since just a segment doesn't help at all.

03-02-2014, 07:53 PM
Find
Radical Batz Offline
Posting Freak

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

(03-02-2014, 07:53 PM)Putmalk Wrote: What error are you receiving? What is happening vs. desired effects? Post the entire code, since just a segment doesn't help at all.
03-02-2014, 08:13 PM
Find




Users browsing this thread: 1 Guest(s)