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
Error
Icaab2608 Offline
Member

Posts: 85
Threads: 37
Joined: Jul 2013
Reputation: 0
#1
Question  Error

Where here eroor:
PHP Code: (Select All)
const string PLAYER "Player";
const 
int ON_ENTER_AND_LEAVE 0;
const 
int ON_ENTER 1;
const 
int ON_LEAVE = -1;
const 
bool ONCE true;
const 
bool PERSIST false;
const 
bool DESTROY_ITEM true;
const 
bool KEEP_ITEM false;
const 
bool ACTIVE true;
const 
bool INACTIVE false;
const 
string NO_ANIMATION "";
const 
string NO_FUNCTION "";
const 
string NO_CALLBACK "";
const 
string EMPTY = "";

int iFlyingCorpse ;
void OnStart()
{
RotatePropToSpeed("human_bone_1"0.3f2010,false,"");
RotatePropToSpeed("human_bone_2"0.3f2010,false,"");
RotatePropToSpeed("human_bone_3"0.3f2010,false,"");
RotatePropToSpeed("human_bone_4"0.3f2010,false,"");
RotatePropToSpeed("human_bone_5"0.3f2010,false,"");
RotatePropToSpeed("human_bone_6"0.3f2010,false,"");
RotatePropToSpeed("human_bone_7"0.3f2010,false,"");
RotatePropToSpeed("human_bone_8"0.3f2010,false,"");
RotatePropToSpeed("human_bone_9"0.3f2010,false,"");
RotatePropToSpeed("human_bone_10"0.3f2010,false,"");
AddEntityCollideCallback("Player""ScriptArea_1""Playerfalls"true1);
AddEntityCollideCallback("Player""Area_TriggerBehindNoise_2""CollideStairsSteps2"true0);
AddEntityCollideCallback("Player""Area_TriggerBehindNoise_3""CollideStairsSteps3"true0);
AddEntityCollideCallback("Player""Area_TriggerBehindNoise_4""CollideStairsSteps4"true0);
AddEntityCollideCallback("Player""Area_TriggerBehindNoise_5""CollideStairsSteps5"true0);
AddEntityCollideCallback("Player""Area_Stairs""CollideStairs"false0);
AddEntityCollideCallback("Player""AreaClarice_1""CollideAreaClarice_1"true1);
AddEntityCollideCallback("Player""Health1""CollideHealth1"true1);
AddEntityCollideCallback("Player""Health2""CollideHealth2"true1);
AddEntityCollideCallback("Player""Spawn1""Spawn1"true1);
AddEntityCollideCallback("Player""Spawn2""Spawn2"true1);
for( 
int i 1<= 22i++)
AddEntityCollideCallback("Skull_Brick_*""BreakArea_"+i"BreakArea"false1);
AddEntityCollideCallback("Player""Scream2""Grunt"true1);
AddEntityCollideCallback("Player""Scream3""Brunt"true1);
AddEntityCollideCallback("Player""Scream4""suitor"true1);
for(
int i=1i<=7; ++i)
AddEntityCollideCallback("Player""AreaTerror_"+i"CollideTerrorArea"false0);
AddEntityCollideCallback("Player","AreaCradleSoundEvent""CollideCradleSoundEvent"true1);
AddEntityCollideCallback("AreaStrappadoEvent_*""strappado_shackles_2""CollideStrappadoShackles",true1);
for(
int i=1i<=4; ++i)
AddEntityCollideCallback("Player""AreaSawSounds_"+i"CollideSawSounds",true1);
AddEntityCollideCallback("Player""Locked""Locked",true1);
AddEntityCollideCallback("thin_straight_mini_open_1""pipe""pipe",true1);
AddEntityCollideCallback("Player""button1""wooden_slide_door",true1);
AddEntityCollideCallback("Player""button1""wooden_slide_door2",true1);
AddEntityCollideCallback("ladder_grab_1""ScriptArea_5""ladder",true1);
for(
int i=1i<=11; ++i)
AddEntityCollideCallback("wood_box02_"+i"Break""Break"true1);
AddEntityCollideCallback("Player""Locked_Door""Locked_Door"true1);
AddEntityCollideCallback("Player""Locked_Door2""Locked_Door2"true1);
AddEntityCollideCallback("Player""OpenDoors""OpenDoors"true1);
AddEntityCollideCallback("Player""Grunt""Grunt"true1);
AddEntityCollideCallback("Player""Grunt2""Grunt2"true1);
AddEntityCollideCallback("Player""AGRIPPA""AGRIPPA"true1);
AddEntityCollideCallback("Player""GruntAndDoor""GruntAndDoor"true1);
AddEntityCollideCallback("Player""collapse""Broken"true1);
AddEntityCollideCallback("Player""END1""BeginCavein"true1);
AddEntityCollideCallback("Player""AreaDamage_1""CaveDamage"false0);
AddEntityCollideCallback("Player""AreaIronMaidenOpen""OpenIronMaiden"true1);
AddEntityCollideCallback("Player""AreaInMaiden""CollideAreaInMaiden"false0);
AddEntityCollideCallback("Player""Lamps""Lamps"false0);
InteractConnectPropWithRope("wheelrope""crank_iron_2","RopeArea_1"true6,3,3false0);
InteractConnectPropWithRope("wheelrope2""crank_iron_1","RopeArea_3"true6,3,3false0);
InteractConnectPropWithRope("wheelrope3""crank_wood_1","RopeArea_6"true6,3,3false0);
InteractConnectPropWithRope("wheelrope4""crank_wood_2","RopeArea_7"true6,3,3false0);
SetEntityConnectionStateChangeCallback("lever_small01_1""Lever");
SetEntityPlayerInteractCallback("HealthAndMind""HealthAndMind"true);
AddUseItemCallback("""lever_small01_item_1""lever_small_mount_1""Active"true);
}
void HealthAndMind(string &in entity)
{
AutoSave();
AddPlayerHealth(0.25);
AddPlayerSanity(0.25);
SetLampLit("torch_static01_20"truetrue);
SetLampLit("torch_static01_21"truetrue);
SetPropActiveAndFade("slime_3way_8"false2.5f);
SetPropActiveAndFade("slime_3way_7"false2.5f);
SetPropActiveAndFade("slime_3way_12"false2.5f);
SetPropActiveAndFade("slime_anim_wall_7"false2.5f);
SetPropActiveAndFade("slime_anim_wall_6"false2.5f);
SetPropActiveAndFade("slime_anim_wall_3"false2.5f);
SetPropActiveAndFade("slime_anim_wall_5"false2.5f);
SetPropActiveAndFade("slime_anim_wall_4"false2.5f);
SetEntityActive("SignArea_1"false);
SetEntityActive("HealthAndMind"false);
SetEntityActive("GruntAndDoor"true);
SetEntityActive("slime_pile_large_2"false);
SetEntityActive("slime_pile_large_3"false);
SetEntityActive("slime_pile_large_4"false);
SetEntityActive("slime_pile_large_5"false);
SetEntityActive("slime_pile_large_6"false);
SetEntityActive("slime_pile_large_7"false);
SetEntityActive("slime_6way_13"false);
SetEntityActive("slime_6way_14"false);
SetEntityActive("slime_6way_15"false);
SetEntityActive("SlimeDamageArea_1"false);
SetEntityActive("slime_pile_large_8"true);
SetEntityActive("slime_pile_large_9"true);    
SetSwingDoorLocked("prison_8"truetrue);
}
void Locked(string &in asParentstring &in asChildint alState)
{
SetSwingDoorLocked("castle_4"truetrue);
PlaySoundAtEntity("""react_breath_slow.snt""Player"0false); 
PlaySoundAtEntity("""react_scare""Player"0false);  
PlaySoundAtEntity("""close_door.snt""Player"0false);  
GiveSanityDamage(5.0ftrue);
PlayGuiSound("rnd3.ogg"0.4f);
}
void Active(string &in asItemstring &in asEntity)
{
PlaySoundAtEntity("""13_rod_in.snt""Player"0false);
SetEntityActive("lever_small01_1"true);
SetEntityActive("lever_small_mount_1"false);
RemoveItem("lever_small01_item_1");
}
void Broken_Castle(string &in asEntity)
{
SetPropHealth("castle_1"0.0f); 
PlaySoundAtEntity("""react_breath_slow.snt""Player"0false);  
PlaySoundAtEntity("""react_scare""Player"0false); 
PlaySoundAtEntity("""close_door.snt""Player"0false); 
GiveSanityDamage(5.0ftrue);
}
void Locked_Door(string &in asParentstring &in asChildint alState)
{
SetSwingDoorLocked("prison_7"truetrue);
PlayGuiSound("rnd1.ogg"0.1f);
PlaySoundAtEntity("""door_prison_close.snt""Player"0false);  
GiveSanityDamage(3.0ftrue);
}
void Locked_Door2(string &in asParentstring &in asChildint alState)
{
SetSwingDoorLocked("prison_section_4"truetrue);
PlaySoundAtEntity("""door_bar_close.snt""Player"0false);  
GiveSanityDamage(2.0ftrue);
PlayGuiSound("rnd1.ogg"0.1f);
}
void OpenDoors(string &in asParentstring &in asChildint alState)
{
SetEntityActive("prison_section_4"false);
SetEntityActive("prison_section_5"true);
PlaySoundAtEntity("""door_bar_open.snt""Player"0false);  
SetEntityActive("prison_7"false);
SetEntityActive("prison_9"true);
PlaySoundAtEntity("""door_prison_open.snt""Player"0false); 
SetEntityActive("castle_2"false);
SetEntityActive("castle_3"true);
PlaySoundAtEntity("""open_door.snt""Player"0false);  
SetEntityActive("Grunt2"true);
}
void Grunt(string &in asParentstring &in asChildint alState)
{
SetPlayerActive(false);
PreloadSound("rnd2");
SetEntityActive("servant_grunt_ragdoll_1"true);
StartPlayerLookAt("LOOKGRUNT"11"");
AddTimer(""4.0f"stoplooking2");
}
void stoplooking2(string &in asTimer)
{
AddPropImpulse("grunt1", -1.2000"world");
AddTimer(""4.0f"stoplooking3");
}
void stoplooking3(string &in asTimer)
{
GiveSanityDamage(5.0ftrue);
AddPropForce("servant_grunt_ragdoll_1"5000.0f0.0f0.0f"world");
StopPlayerLookAt();
SetPlayerActive(true);
SetEntityActive("servant_grunt_ragdoll_1"false);
PlaySoundAtEntity("""close_door.snt""Player"0false); 
}
void Grunt2(string &in asParentstring &in asChildint alState)
{
PlaySoundAtEntity("""open_door.snt""Player"0false); 
SetEntityActive("servant_grunt_ragdoll_2"true);
SetPlayerActive(false);
AddTimer(""4.0f"Grunt3");
}
void Grunt3(string &in asTimer)
{
SetEntityActive("servant_grunt_ragdoll_2"false);
SetEntityActive("servant_grunt_ragdoll_3"true);
PreloadSound("rnd1");
GiveSanityDamage(10.0ftrue);
AddTimer(""4.0f"Grunt4");
}
void Grunt4(string &in asTimer)
{
SetEntityActive("servant_grunt_ragdoll_3"false);
GiveSanityDamage(2.0ftrue);
SetPlayerActive(true);
}
void GruntAndDoor(string &in asParentstring &in asChildint alState)
{
SetEntityActive("servant_grunt_ragdoll_4"true);
StartPlayerLookAt("LOOKGRUNT2"11"");
SetPlayerActive(false);
SetEntityActive("prison_11"true);
SetEntityActive("prison_9"false);
PlaySoundAtEntity("""door_prison_locked.snt""Player"0false); 
AddTimer(""4.0f"GruntAndDoor2");
}
void GruntAndDoor2(string &in asTimer)
{
CreateParticleSystemAtEntity("""ps_break_cavein_blood.ps""Boom"false);
SetEntityActive("servant_grunt_ragdoll_4"false);
SetPropActiveAndFade("slime_6way_16"true1.5f);
StopPlayerLookAt();
SetPlayerActive(true);
SetEntityActive("prison_8"false);
SetEntityActive("prison_12"true);
}
void AGRIPPA(string &in asParentstring &in asChildint alState)
{
SetSwingDoorLocked("castle_2"truetrue);
PlaySoundAtEntity("""close_door.snt""Player"0false);  
GiveSanityDamage(2.0ftrue); 
SetPlayerActive(false);
SetEntityActive("agrippa_head_obj_1"true);
StartPlayerLookAt("LOOKAGRIPPA"11"");
AddTimer(""4.0f"AGRIPPA2");
}
void AGRIPPA2(string &in asTimer)
{
GiveSanityDamage(3.0ftrue);
StopPlayerLookAt();
SetPlayerActive(true);
SetEntityActive("agrippa_head_obj_1"false);
PlaySoundAtEntity("""open_door.snt""Player"0false); 
SetEntityActive("castle_2"false);
SetEntityActive("castle_3"true);
}
void Broken(string &in asParentstring &in asChildint alState)
{
SetEntityActive("sledge_2"false);
SetEntityActive("stool_wood_5"false);
SetEntityActive("torture_wheel_1"false);
SetEntityActive("brown_cave_in_28"true);
SetEntityActive("brown_cave_in_29"true);
SetEntityActive("drag_brown_rock_34"true);
SetEntityActive("drag_brown_rock_35"true);
SetEntityActive("drag_brown_rock_36"true);
SetEntityActive("drag_brown_rock_37"true);
SetEntityActive("drag_brown_rock_38"true);
SetEntityActive("drag_brown_rock_39"true);
SetEntityActive("drag_brown_rock_40"true);
PlayMusic("explosion_rock_large.ogg"false112false);
CreateParticleSystemAtEntity("""ps_break_cavein.ps""Stone1"false);
CreateParticleSystemAtEntity("""ps_break_cavein.ps""Stone2"false);
CreateParticleSystemAtEntity("""ps_break_cavein.ps""Stone3"false);
CreateParticleSystemAtEntity("""ps_break_cavein.ps""Stone4"false);
CreateParticleSystemAtEntity("""ps_break_mansionbase_wall.ps""Stone5"false);
CreateParticleSystemAtEntity("""ps_break_mansionbase_wall.ps""Stone6"false);
CreateParticleSystemAtEntity("""ps_break_mansionbase_wall.ps""Stone7"false);
SetEntityActive("END1"true);
SetEntityActive("AreaDamage_1"true);
}
void BeginCavein(string &in asParentstring &in asChildint alState)
{
StartScreenShake(0.08f5.01.01.0);
SetEntityActive("block_box_3"true);
SetEntityActive("block_box_4"true);
SetEntityActive("block_box_5"true);
SetEntityActive("block_box_6"true);
SetEntityActive("block_box_7"true);
SetEntityActive("block_box_8"true);
SetEntityActive("block_box_9"true);
SetEntityActive("block_box_10"true); 
SetEntityActive("block_box_11"true);
SetEntityActive("block_box_12"true);
SetEntityActive("block_box_13"true);
SetEntityActive("block_box_14"true);
SetEntityActive("block_box_15"true);
SetEntityActive("block_box_16"true);
SetEntityActive("block_box_17"true);
SetEntityActive("block_box_18"true);
AddTimer("cavein"3.0"CaveIn");
AddTimer(""02.0f"warning");
SetMessage("Set message""warning"15.0f);
}
void CaveIn(string &in asTimer)
{
  if(
GetLocalVarInt("GiveDamage") == 1) {
  
GivePlayerDamage(25.0f"BloodSplat"truefalse);  //Hurt player if stands too close to cavein
  
  
AddDebugMessage("Hurt Player"false);
  }


GiveSanityDamage(10.0true);

SetEntityActive("brown_cave_in_30"true);
SetEntityActive("brown_cave_in_31"true);
SetEntityActive("brown_cave_in_32"true);
CreateParticleSystemAtEntity("""ps_break_mansionbase_wall.ps""AreaExplosion_1"false);
CreateParticleSystemAtEntity("""ps_break_mansionbase_wall.ps""AreaExplosion_2"false);
CreateParticleSystemAtEntity("""ps_break_mansionbase_wall.ps""AreaExplosion_3"false);
CreateParticleSystemAtEntity("""ps_break_mansionbase_wall.ps""AreaExplosion_4"false);
PlaySoundAtEntity("""explosion_rock_large.snt""Player"0false);
PlaySoundAtEntity("""react_breath.snt""door_frame_5"0.4ffalse);
}

void CaveDamage(string &in asParentstring &in asChildint alState)
{
   if(
alState == 1) {
   
SetLocalVarInt("GiveDamage"1);
   
   
AddDebugMessage("Added Damage"false);
   }
   
   else if(
alState == -1) {
   
SetLocalVarInt("GiveDamage"0);
   
   
AddDebugMessage("Removed Damage"false);
   }
  
   
   
}
void Lamps(string &in asParentstring &in asChildint alState)
{
SetLampLit("candlestick_floor_red_1"truetrue);
SetLampLit("candlestick_floor_red_2"truetrue);
SetLampLit("candlestick_floor_red_3"truetrue);
SetLampLit("candlestick_floor_red_4"truetrue);
SetLampLit("candle_floor_new_1"truetrue);
SetLampLit("candle_floor_new_2"truetrue);
SetLampLit("candle_floor_new_3"truetrue);
SetLampLit("candle_floor_new_4"truetrue);
SetLampLit("candle_floor_new_5"truetrue);
SetLampLit("candle_floor_new_6"truetrue);
SetLampLit("candle_floor_new_7"truetrue);
SetLampLit("candle_floor_new_8"truetrue);
SetLampLit("candle_floor_new_9"truetrue);
SetLampLit("candle_floor_new_10"truetrue);
SetLampLit("candle_floor_new_11"truetrue);
SetLampLit("candle_floor_new_12"truetrue);
SetLampLit("candle_floor_new_13"truetrue);
SetLampLit("candle_floor_new_14"truetrue);
SetLampLit("candle_floor_new_15"truetrue);
SetLampLit("candle_floor_new_16"truetrue);
SetLampLit("candle_floor_new_17"truetrue);
SetLampLit("candle_floor_new_18"truetrue);
SetLampLit("candle_floor_new_19"truetrue);
SetLampLit("candle_floor_new_20"truetrue);
PlaySoundAtEntity("""ui_emotion_stone""torture_wheel_1"0false);  
PlaySoundAtEntity("""sanity_heartbeat""Player"0false);  
SetEntityActive("AreaEmotionEventWheel"true);
SetEntityActive("collapse"true);
AddTimer(""2.0f"Lamps2");
}
void Lamps2(string &in asTimer)
{
SetEntityActive("Lamps"false);
}
void OnEnter()
{
PlayMusic("23_amb.ogg"true1.0f4.0f0true);
AutoSave();
AddEntityCollideCallback("Player""Scream6""suitor2"true1);
}
void Playerfalls(string &in asParentstring &in asChildint alState)
{
SetEntityActive("crawler2_dead_1"true);
float mult 155.0f;
AddPlayerBodyForce(mult 2107mult 20false);
AddTimer(""4.0f"Teleport");
FadePlayerRollTo(40.0f10.0f100.0f);
SetPlayerActive(false);
PlaySoundAtEntity("","player_bodyfall.snt""Player"0false);
SetPlayerCrouching(true);
GivePlayerDamage(0"BloodSplat"falsefalse);

void Teleport(string &in asTimer)
{
FadeOut(0);
TeleportPlayer("PlayerStartArea_2");
AddTimer(""1.0f,"PlayerStandsUpAgain");
}
void PlayerStandsUpAgain(string &in asTimer)
{
FadeIn(0);
SetPlayerSanity(30);
SetPlayerCrouching(false);
StartPlayerLookAt("Look1"11"");
AddTimer("Look2"3.0f"Look2");
PlaySoundAtEntity("""player_climb""Player"0false);
}

void Look2(string&in asTimer)
{
PlaySoundAtEntity("""react_breath""Player"0false);
StartPlayerLookAt("Look2"23"");
MovePlayerHeadPos(00050.0f);
AddTimer("Look3"2.5f"Look3");
}

void Look3(string&in asTimer)
{
StartPlayerLookAt("Look3"35"");
MovePlayerHeadPos(0, -0.5, -0.310.0f);
AddTimer("Look4"0.5f"Look4");
PlaySoundAtEntity("""player_climb""Player"0false);
}
void Look4(string&in asTimer)
{
StartPlayerLookAt("Look4"11"");
AddTimer("stoplooking"1.5f"stoplooking");
PlaySoundAtEntity("""player_climb""Player"0false);
FadePlayerRollTo(0.0f60.0f60.0f);
AutoSave();
}
void stoplooking(string&in asTimer)
{
     
StopPlayerLookAt();
     
SetPlayerActive(true);
}
void ColideHealth1(string &in asParentstring &in asChildint alState)
{
SetEntityActive("new_wine_1"true);
SetEntityActive("new_wine_2"true);
SetEntityActive("new_wine_3"true);
SetEntityActive("new_wine_4"true);
SetEntityActive("new_wine_5"true);
SetEntityActive("new_wine_6"true);

}
void ColideHealth2(string &in asParentstring &in asChildint alState)
{
SetEntityActive("new_wine_7"true);
SetEntityActive("new_wine_8"true);
SetEntityActive("new_wine_9"true);
SetEntityActive("new_wine_10"true);
SetEntityActive("new_wine_11"true);
}
void BreakArea(string &in asParentstring &in asChildint alState)
{
    
SetPropActiveAndFade("mining_room_wall_new_"+StringSub(asChild102), true2);
    
SetPropStaticPhysics("mining_room_wall_new_"+StringSub(asChild102), true);
    
RemoveEntityCollideCallback("Skull_Brick_*"asChild);
    
SetSanityDrainDisabled(true);
}
void suitor2(string &in asParentstring &in asChildint alState)
{
for (
int i 1<3i++)
            {
SetEntityActive("enemy_suitor_slime_2"true);              
AddEnemyPatrolNode("enemy_suitor_slime_2""enemy_suitor_slime_path_"+i0"");}
}
void CollideTerrorArea(string &in asParentstring &in asChildint alState)
{
    
AddDebugMessage("Terror area: "+asChild+" State: "+alStatefalse);
    
    
////////////////////////
    // Enter
    
if(alState == 1)
    {
        
PlaySoundAtEntity(asChild+"terror""ui_torture.ent"asChild10true);
        
FadeImageTrailTo(1.0f0.5f);
        
AddTimer(asChild+"terror"2"TimerTerrorDrain");
    }
    
////////////////////////
    // Leave
    
else
    {
        
FadeImageTrailTo(0.0f0.5f);
        
StopSound(asChild+"terror"2);
        
RemoveTimer(asChild+"terror");
    }
    
}
void TimerTerrorDrain(string asTimer)
{
    if(
GetPlayerSanity() < 35)
        
GiveSanityDamage(0.05f*0.15ffalse);
    else
        
GiveSanityDamage(0.05f*0.5ffalse);
        
    
AddTimer(asTimer0.05f"TimerTerrorDrain");
}

void InteractEmotionEffectCradle(string &in asArea)
{
    
StartEffectEmotionFlash("Ch02Level23""TortureText_Cradle""ui_insanity_touch.snt");
}
void CollideCradleSoundEvent(string &in asParentstring &in asChildint alState)
{
    
//The captive (heard in visions) is still alive, pants silently and is dragged away.
    //PlaySoundAtEntity("sawvictim", "23_saw_victim_pant_and_drag", "AreaCradleSoundSource", 0, false);
    
    
AddDebugMessage("Captive pants and is dragged off."false);
    }
void CollideSawSounds(string &in asParentstring &in asChildint alState)
{
    
string sLoopingSound "";
    
string sEventSound "";
    
float fFadeOutTime 2.0f;
    
    
//Low muffled cries + silent looping sawing starts
    
if(asChild == "AreaSawSounds_1")
    {
        
sEventSound "23_saw_voice1";
        
sLoopingSound "23_saw1";    
    }
    
//A little bit  muffled cries + a bit louder looping sawing starts
    
if(asChild == "AreaSawSounds_2")
    {
        
sEventSound "23_saw_voice2";
        
sLoopingSound "23_saw2";            
    }
    
//A louder (but still muffled) screams and intense sawing.
    
if(asChild == "AreaSawSounds_3")
    {
        
sEventSound "23_saw_voice3";
        
sLoopingSound "23_saw3";
    }
    
//Just fade out sawing.
    
if(asChild == "AreaSawSounds_4")
    {
        
fFadeOutTime 2.0;
    }
        
    
//////////////////////////////////////
    //Stop current sound and play a new one
    
StopSound("saw_script_loop",fFadeOutTime); 
    
StopSound("saw_script_event",fFadeOutTime); 
    if(
sLoopingSound != "")    PlaySoundAtEntity("saw_script_loop",sLoopingSound"AreaSawSoundSource"1true);
    if(
sEventSound != "")    PlaySoundAtEntity("saw_script_event",sEventSound"AreaSawSoundSource"0false);
    
    
AddDebugMessage("saw area: "+asChild+" loopsound: "+sLoopingSound " event sound: "+sEventSoundfalse);
    
}
void CollideStrappadoShackles(string &in asParentstring &in asChildint alState)
{
    
string sSound "";
    
    
//Sound of stretch and pain
    
if(asParent == "AreaStrappadoEvent_1")
    {
        
sSound "23_strap1";    
        
SetRadialBlurStartDist(0.3f);
        
FadeRadialBlurTo(0.3f0.1f);
    }
    
//More stretch, panting, the vicitim is now in air and kicks chair
    
else if(asParent == "AreaStrappadoEvent_2")
    {
        
sSound "23_strap2";    
        
SetPropActiveAndFade("stool_wood_2"false0.3f);
        
SetPropActiveAndFade("stool_wood_1"true0.3f);
        
SetRadialBlurStartDist(0.3f);
        
FadeRadialBlurTo(0.3f0.1f);
    }
    
//Higher up, even more pain.
    
else if(asParent == "AreaStrappadoEvent_3")
    {
        
sSound "23_strap3";    
        
SetRadialBlurStartDist(0.3f);
        
FadeRadialBlurTo(0.3f0.1f);
    }
    
    
AddTimer("stopradial"1.0f"TimerStopRadial");
    
AddDebugMessage("Strappado area: "+asParent+" sound: "+sSoundfalse);
    
PlaySoundAtEntity("strappado",sSoundasParent0false);
}
void TimerStopRadial(string &in asTimer)
{
    
FadeRadialBlurTo(0.0f0.05f);
}
void InteractEmotionEffectSaw(string &in asArea)
{
    
StartEffectEmotionFlash("Ch02Level23""TortureText_Saw""ui_insanity_touch.snt");
}
void CradleFlashbackOver()
{
    
SetEntityActive("AreaEmotionEffectCradle"true);    
    
PlaySoundAtEntity("AreaEmotionEffectCradle""23_pyramid""AreaEmotionEffectCradle"0.0ffalse);
}
void pipe(string &in asParentstring &in asChildint alState)
{
PlaySoundAtEntity("""13_whomp.snt""Player"0false);
DestroyParticleSystem("Particle1");
DestroyParticleSystem("Particle2");
AddTimer(""1.0f,"Pipe2");
}
void Pipe2(string &in asParentstring &in asChildint alState)
{
RotatePropToSpeed("button_simple_1"0.3f2010,false,"");
RotatePropToSpeed("button_simple_2"0.3f2010,false,"");
SetEntityActive("button1"true);  
SetEntityActive("button2"true);  
}
void wooden_slide_door(string &in entity)
{
SetMoveObjectStateExt("wooden_slide_door_1" 1220.1true);
}
void wooden_slide_door2(string &in entity)
{
SetMoveObjectStateExt("wooden_slide_door_2" 1220.1true);
}
void ladder(string &in asParentstring &in asChildint alState)
{
SetEntityActive("LadderArea_2"true);
}
void FadeLadder1(string&in asTimer)
{
SetPropActiveAndFade("ladder_grab_1"false2.5f);
SetPropActiveAndFade("ladder_mount_1"false2.5f);
SetPropActiveAndFade("ladder_static_1"false2.5f);
}
void Ladder1(string &in asStickyAreastring &in asBodyName)
{
SetEntityActive("LadderArea_2"true);
SetPropStaticPhysics("ladder_grab_1"true);
SetPropStaticPhysics("ladder_mount_1"true);
SetPropStaticPhysics("ladder_static_1"true);
}
void Break(string &in asParentstring &in asChildint alState)
{
SetEntityActive("wooden_boards_block_1"false);
SetEntityActive("wooden_boards_block_2"false);
SetEntityActive("wooden_boards_block_broken_1"true);
SetEntityActive("wooden_boards_block_broken_2"true);
CreateParticleSystemAtEntity("""ps_break_wood_small.ps""Break1"false);
CreateParticleSystemAtEntity("""ps_break_wood_small.ps""Break2"false);
CreateParticleSystemAtEntity("""ps_break_wood_small.ps""Break3"false);
GiveSanityBoost();
SetPropHealth("boards_1"0.0);
PlaySoundAtEntity("""break_wood.snt""wooden_boards_block_broken_1"0.0false);
}
void Open(string &in asEntity)
{
SetEntityActive("castle_4"false);
SetEntityActive("castle_5"true);
SetSwingDoorClosed("castle_5"truetrue);
PlaySoundAtEntity("""open_door.snt""Player"0false);  
}
void Lever(string &in asEntityint alState)
{
     if (
alState == 1)
     {

     
SetMoveObjectState("wooden_slide_door_3",2.0f);
     
AddTimer(""2.0f"Ladder_grab");
     
PlaySoundAtEntity("""quest_completed.snt""Player"0false);
          return;
     }
}
void Ladder_grab(string &in asTimer)
{
SetEntityActive("ladder_grab_1"true);
}
void Lamps2(string &in asTimer)
{
void OpenIronMaiden(string &in asParentstring &in asChildint alState)
{
    
AddDebugMessage("Scary iron maiden opening"false);
    
    
SetSwingDoorDisableAutoClose("iron_maiden_2"true);
    
SetSwingDoorClosed("iron_maiden_2"falsefalse);
    
    
/////////////////////////////////////////////
    // Open iron maiden doors
    
AddBodyImpulse("iron_maiden_2_leftDoor", -0.7, -0.7"world");
    
AddBodyImpulse("iron_maiden_2_rightDoor", -0.70.7"world");
    
    
AddTimer("TimerExtraMaidenImpulse"0.1"TimerExtraMaidenImpulse");
    
    
PlaySoundAtEntity("AreaIronMaidenEffect""24_iron_maiden""AreaIronMaidenEffect"0.0ffalse);
    
    
CreateParticleSystemAtEntity("maidensmoke","ps_iron_maiden_event_smoke.ps""AreaIronMaidenEffect"false);
    
StartScreenShake(0.1f0.1f0.0f0.1f);
    
    
// Disable trigger area and activate room sanity drain
    
SetEntityActive("AreaIronMaidenOpen"false);
    
SetEntityActive("AreaInsanityEffect_1"true);
    
    
GiveSanityDamage(10.0ftrue);
    
SetRadialBlurStartDist(0.4f);
    
FadeRadialBlurTo(0.2f0.4f);
    
    
AddTimer("TimerActiveMaidenEmotion",1.5f,"TimerActiveMaidenEmotion");
}

void TimerExtraMaidenImpulse(string &asTimer)
{
    
AddBodyImpulse("iron_maiden_2_leftDoor", -0.7, -0.7"world");
    
AddBodyImpulse("iron_maiden_2_rightDoor", -0.70.7"world");
}

//Activate an emotion event area.
void TimerActiveMaidenEmotion(string &asTimer)
{
    
SetEntityActive("AreaEmotionEffectIronMaiden"true);
    
FadeRadialBlurTo(0.0f0.4f);
}
void CollideAreaInMaiden(string &in asParentstring &in asChildint alState)
{
    if(
alState == 1)
        
SetEntityPlayerLookAtCallback("AreaLookMaiden""LookAtAreaLookMaiden"true);
    else
        
SetEntityPlayerLookAtCallback("AreaLookMaiden"""true);
}
void LookAtAreaLookMaiden(string &in asEntityint alState)
{
    if(
GetLocalVarInt("MaidenEvent") == 1) return;
    
    
AddBodyImpulse("iron_maiden_2_rightDoor"10, -10"world");
    
    
GivePlayerDamage(10.0f"Slash"falsefalse);
    
GiveSanityDamage(10.0ftrue);
    
    
PlayGuiSound("attack_claw_hit02.ogg"0.8f);
    
    
SetSwingDoorClosed("iron_maiden_2"truetrue);
    
    
SetLocalVarInt("MaidenEvent"1);
}
void InteractEmotionEffectWheel(string &in asArea)
{
StartEffectEmotionFlash("""""ui_insanity_touch.snt");
PlaySoundAtEntity("""21_meat_squeaz""torture_wheel_1"0false);      
PlayGuiSound("21_scream9.ogg"0.2f);

Huh
07-10-2013, 08:09 AM
Find


Messages In This Thread
Error - by Icaab2608 - 07-10-2013, 08:09 AM
RE: Error - by PutraenusAlivius - 07-10-2013, 09:46 AM
RE: Ошибка - by Icaab2608 - 07-10-2013, 07:23 PM
RE: Error - by plutomaniac - 07-12-2013, 02:13 PM
RE: Error - by Fatalist - 07-10-2013, 04:28 PM
RE: Ошибка - by Icaab2608 - 07-12-2013, 11:28 AM
RE: Error - by Artyom - 07-10-2013, 04:30 PM
RE: Error - by Daemian - 07-10-2013, 08:31 PM



Users browsing this thread: 1 Guest(s)