Frictional Games Forum (read-only)

Full Version: Where do I put this code? [SOLVED]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?

Code:
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
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)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.