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
Level Editor Help Static objects disappear / enemy deactivate
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: Static objects disappear / enemy deactivate

If there are map_cache in yuor maps folder, delete 'em. For the monster, do this (your script fixed):

void OnStart()

{

AddUseItemCallback("", "key_torture_chamber_1", "castle_arched01_1", "UsedKeyOnDoor", true);

AddEntityCollideCallback("Player", "ScriptArea_1", "schweine", true, 1);

AddEntityCollideCallback("Player", "ScriptArea_2", "schweinehang", true, 1);

AddEntityCollideCallback("Player", "ScriptArea_3", "klang", true, 1);

AddEntityCollideCallback("Player", "ScriptArea_4", "staub", true, 1);

AddEntityCollideCallback("Player", "ScriptArea_5", "engel", true, 1);

AddEntityCollideCallback("Player", "ScriptArea_6", "falle", true, 1);

AddEntityCollideCallback("Player", "ScriptArea_7", "enemyklang", true, 1);

AddEntityCollideCallback("Player" , "ScriptArea_8" , "wegpunkte" , true , 1);

AddEntityCollideCallback("Player", "ScriptArea_9", "klang2", true, 1);

AddUseItemCallback("", "key_torture_chamber_2", "mansion_1", "UsedKeyOnDoor2", true);

AddEntityCollideCallback("Player", "ScriptArea_10", "deaktivierung", true, 1);

}











void deaktivierung(string &in asItem, string &in asEntity)



{

SetEntityActive("servant_grunt_1", false);



}

















void UsedKeyOnDoor2(string &in asItem, string &in asEntity)

{

    SetSwingDoorLocked("mansion_1", false, false);

    PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0, false);

    RemoveItem("key_torture_chamber_2");

    AddDebugMessage("KeyOnDoor", false);

}



















void klang2(string &in asParent, string &in asChild, int alState)

{

    PlaySoundAtEntity("", "scare_human_noices.snt", "Player", 0, false);

    

    



}



















void wegpunkte(string &in asParent, string &in asChild, int alState)

{

    SetEntityActive("servant_grunt_1", true);

    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "Idle");

    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "Idle");

    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "Idle");

    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "Idle");

    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "Idle");

    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, "Idle");

    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0, "Idle");

    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "Idle");

    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0, "Idle");

    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_10", 0, "Idle");

    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 0, "Idle");

    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_12", 0, "Idle");

    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "Idle");

    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_14", 0, "Idle");

    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_15", 0, "Idle");

}

























void enemyklang(string &in asParent, string &in asChild, int alState)

{

    PlaySoundAtEntity("", "amb_idle_scratch.snt", "Player", 0, false);

    

    



}

















void falle(string &in asParent, string &in asChild, int alState)

{

    PlaySoundAtEntity("", "lurker_hit_wood.snt", "Player", 0, false);

    SetEntityActive("armour_nice_complete_1", true);

    SetEntityActive("armour_nice_complete_2", true);

    



}







void engel(string &in asParent, string &in asChild, int alState)

{

    StartPlayerLookAt("angel_statue_1", 15, 15, "");

    PlaySoundAtEntity("", "react_sigh.snt", "Player", 0, false);

    SetEntityActive("angel_statue_1", true);

    GiveSanityDamage(2.0f, true);

    AddTimer("opala",0.2f,"EnemyTimer");

    CreateParticleSystemAtEntity("E1PS", "ps_ghost_release.pss", "particlearea4", true);



}























void staub(string &in asParent, string &in asChild, int alState)

{

    PlaySoundAtEntity("", "28_done03.snt", "Player", 0, false);

    SetEntityActive("ParticleSystem_17", true);

    SetEntityActive("ParticleSystem_19", true);

    CreateParticleSystemAtEntity("E1PS", "ps_debris_tunnel.ps", "particlearea", true);

    CreateParticleSystemAtEntity("E1PS", "ps_debris_tunnel.ps", "particlearea2", true);



}



















void klang(string &in asParent, string &in asChild, int alState)

{

    PlaySoundAtEntity("", "scare_baby_cry.snt", "Player", 0, false);

    

}























void schweinehang(string &in asParent, string &in asChild, int alState)

{

    PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

    GiveSanityDamage(5.0f, true);

    SetEntityActive("pig_corpse_hanging_1", true);

    SetEntityActive("pig_corpse_hanging_2", true);

    SetEntityActive("carcass_1", true);

    SetEntityActive("carcass_2", true);

    SetEntityActive("pig_corpse_hanging_3", true);

    SetEntityActive("pig_corpse_hanging_4", true);

    SetEntityActive("pig_corpse_hanging_5", true);

    SetEntityActive("pig_corpse_hanging_6", true);

    SetEntityActive("carcass_3", true);

    CreateParticleSystemAtEntity("E1PS", "ps_cloud_thing01.ps", "particlearea3", true);



}









void schweine(string &in asParent, string &in asChild, int alState)

{

    PlaySoundAtEntity("", "scare_animal_squeal.snt", "Player", 0, false);

    GiveSanityDamage(5.0f, true);

    SetEntityActive("pig_corpse_26", true);

    SetEntityActive("pig_corpse_27", true);

    SetEntityActive("pig_corpse_28", true);

    SetEntityActive("pig_corpse_29", true);

}





















void UsedKeyOnDoor(string &in asItem, string &in asEntity)

{

SetSwingDoorLocked("castle_arched01_1", false, false);

PlaySoundAtEntity("", "unlock_door.snt", "castle_arched01_1", 0, false);

RemoveItem("key_torture_chamber_1");

AddDebugMessage("KeyOnDoor", false);

}









////Timers

void EnemyTimer(string &in asTimer)



{



if(asTimer == "opala")

{

    StopPlayerLookAt();

   AddTimer("Scare2",30.5f,"EnemyTimer");

}

}

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
01-04-2013, 12:11 PM
Find


Messages In This Thread
RE: Static objects disappear / enemy deactivate - by The chaser - 01-04-2013, 12:11 PM



Users browsing this thread: 1 Guest(s)