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
WHAT IS WRONG?!!!!!!!!!!!!!
ProyectV Offline
Junior Member

Posts: 19
Threads: 6
Joined: Apr 2014
Reputation: 0
#1
WHAT IS WRONG?!!!!!!!!!!!!!

Okay, my problem: the map dosen't change the level. My script:

Spoiler below!
void OnStart()
{

}

void OnEnter()
{
AddEntityCollideCallback("enemy_suitor_alois_1","ScriptArea_1", "DestroyDoor", true, 1);
AddEntityCollideCallback("enemy_suitor_alois_1","ScriptArea_2", "ChasePatch", true, 1);
AddEntityCollideCallback("enemy_suitor_alois_1","ScriptArea_3", "DestroyDoor2", true, 1);
AddEntityCollideCallback("Player","ScriptArea_4", "Scare1", true, 1);
AddEntityCollideCallback("prison_2", "ScriptArea_5","ScareCell", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_7","ScareCell2", true, 1);
AddEntityCollideCallback("enemy_suitor_alois_1","PathNodeArea_1", "ErasePatrol", true, 1);
AddLocalVarInt("EventScare1", 0);
AddTimer("", 48.0f, "UnlockCell");
PlayMusic("23_amb02.ogg", true, 0.6f, 4.0f, 0, true);
Again(0.0f);
}

void Again(float eSpeed1)
{
if(GetPlayerHealth() > 0)
{
return;
}

AddTimer("", eSpeed1, "ChangeLevel");
GivePlayerDamage(110, "Claws", true, true);
StartScreenShake(0.01f, 0.5f, 0.5f, 1.0f);
PlayGuiSound("attack_claw.snt", 0.7f);
SetGlobalVarInt("DejaVu", 1);
}

void ChangeLevel(string &in asTimer)
{
ChangeMap("Cuartos Esclavos.map", "PlayerStartArea_1", "22_end.snt", "");
}


void Again(string &in asName)
{
if(GetGlobalVarInt("DejaVu")== 1)
{
SetMessage("", "", 0.0f);
}
}

void UnlockCell(string &in asTimer)
{
SetSwingDoorLocked("prison_1", false, true);
}

void Puzzle1(string &in asEntity, int alState)
{
if(GetLeverState("lever01")== 1
&& GetLeverState("lever02")== -1
&& GetLeverState("lever04")== -1
&& GetLeverState("lever05")== 1
&& GetLeverState("lever06")== 1
&& GetPlayerSanity() >50)
{
SetLeverStuckState("lever01", 1, true);
SetLeverStuckState("lever02", -1, true);
SetLeverStuckState("lever04", -1, true);
SetLeverStuckState("lever05", 1, true);
SetLeverStuckState("lever06", 1, true);

SetLocalVarInt("EventScare1", 1);
SetEntityActive("ScriptArea_4", true);
SetLevelDoorLocked("cellar_wood01_slow_2", false);
PlayMusic("02_puzzle.ogg", false, 1.5f, 2.0f, 0, false);
GiveSanityBoost();
}

else if(GetLeverState("lever01")== 1
&& GetLeverState("lever02")== -1
&& GetLeverState("lever04")== -1
&& GetLeverState("lever05")== 1
&& GetLeverState("lever06")== 1
&& GetPlayerSanity() <50)
{
SetLeverStuckState("lever01", 1, true);
SetLeverStuckState("lever02", -1, true);
SetLeverStuckState("lever04", -1, true);
SetLeverStuckState("lever05", 1, true);
SetLeverStuckState("lever06", 1, true);

SetLevelDoorLocked("cellar_wood01_slow_2", false);
SetEntityActive("enemy_suitor_alois_1", true);
AddTimer("", 1.0f, "Pursuit");
PlayMusic("att_suitor.ogg", true, 3.0f, 0.0f, 1, false);
}
}

void Pursuit(string &in asTimer)
{
ShowEnemyPlayerPosition("enemy_suitor_alois_1");
AddTimer("", 1.0f, "Pursuit");
}

void DestroyDoor(string &in asParent, string &in asChild, int alState)
{
if(GetLocalVarInt("EventScare1")== 0)
{
SetPropHealth("cellar_wood01_slow_4",0.0f);
PlaySoundAtEntity("", "break_wood.snt", "ScriptArea_1", 0, false);
}
}

void ChasePatch(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("enemy_suitor_alois_1", false);
SetEntityActive("enemy_suitor_alois_2", true);
ShowEnemyPlayerPosition("enemy_suitor_alois_2");
}

void DestroyDoor2(string &in asParent, string &in asChild, int alState)
{
if(GetLocalVarInt("EventScare1")== 0)
{
SetPropHealth("cellar_wood01_slow_3",0.0f);
PlaySoundAtEntity("", "break_wood.snt", "ScriptArea_1", 0, false);
}
}

void Scare1(string &in asParent, string &in asChild, int alState)
{
if(GetLocalVarInt("EventScare1")== 1)
{
CreateParticleSystemAtEntity("","ps_dust_whirl","ScriptArea_9", false);
PlaySoundAtEntity("", "general_wind_whirl", "ScriptArea_9", 5.0f, false);
PlaySoundAtEntity("", "scare_loon_single", "ScriptArea_9", 1.0f, false);

PlayMusic("20_event_darkness", false, 0.8f, 2.0f, 10, true);
PlayMusic("12_amb", true, 0.6f, 2.0f, 0, true);

AddTimer("", 1.0f, "LightsOut");

}
}

void LightsOut(string &in asTimer)
{
PlaySoundAtEntity("", "general_wind_whirl", "ScriptArea_4", 5.0f, false);

SetLampLit("torch_static01_7", false, true);
SetLampLit("torch_static01_5", false, true);
SetLampLit("torch_static01_6", false, true);
SetLampLit("torch_static01_4", false, true);
SetLampLit("torch_static01_9", false, true);
SetLampLit("torch_static01_8", false, true);
SetLampLit("candle_floor_small_2", false, true);
SetLampLit("candle_floor_small_1", false, true);
SetLampLit("candle_floor_small_7", false, true);
SetLampLit("candle_floor_small_5", false, true);
SetEntityActive("enemy_suitor_alois_1", true);
AddEnemyPatrolNode("enemy_suitor_alois_1", "PathNodeArea_1", RandFloat(5.0f, 10.0f), "");
AddEnemyPatrolNode("enemy_suitor_alois_1", "PathNodeArea_29", RandFloat(5.0f, 10.0f), "");
AddEnemyPatrolNode("enemy_suitor_alois_1", "PathNodeArea_9", RandFloat(5.0f, 10.0f), "");
AddEnemyPatrolNode("enemy_suitor_alois_1", "PathNodeArea_8", RandFloat(5.0f, 10.0f), "");
GiveSanityDamage(20.0f, true);
}

void ErasePatrol(string &in asParent, string &in asChild, int alState)
{
ClearEnemyPatrolNodes("enemy_suitor_alois_1");
}

void ScareCell(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("ScriptArea_6", 10.0f, 10.0f, "");
FadeSepiaColorTo(0.0f, 2.0f);
FadeRadialBlurTo(0.0f, 2.0f);
GiveSanityDamage(20.0f, true);
PlaySoundAtEntity("", "ui_insanity_touch.snt", "ScriptArea_4", 0, false);
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
AddTimer("", 2.0f, "StopLook");
}

void ScareCell2(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("ScriptArea_8", 1.0f, 3.0f, "");
GiveSanityDamage(20.0f, true);
PlaySoundAtEntity("", "general_wind_whirl.snt", "ScriptArea_8", 0, false);
CreateParticleSystemAtEntity("", "ps_dust_whirl.ps", "ScriptArea_8", false);
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
SetLampLit("torch_static01_3", false, true);
AddTimer("", 2.0f, "StopLook2");
}

void StopLook(string &in asTimer)
{
StopPlayerLookAt();
}

void StopLook2(string &in asTimer)
{
StopPlayerLookAt();
}

void OnLeave()
{
StopSound("att_suitor.ogg", 0.0f);
}
(This post was last modified: 06-06-2014, 02:32 AM by ProyectV.)
06-06-2014, 02:31 AM
Find


Messages In This Thread
WHAT IS WRONG?!!!!!!!!!!!!! - by ProyectV - 06-06-2014, 02:31 AM
RE: WHAT IS WRONG?!!!!!!!!!!!!! - by Daemian - 06-06-2014, 03:59 AM
RE: WHAT IS WRONG?!!!!!!!!!!!!! - by Romulator - 06-06-2014, 07:15 AM
RE: WHAT IS WRONG?!!!!!!!!!!!!! - by Mudbill - 06-06-2014, 01:11 PM
RE: WHAT IS WRONG?!!!!!!!!!!!!! - by ProyectV - 06-07-2014, 02:07 AM
RE: WHAT IS WRONG?!!!!!!!!!!!!! - by ProyectV - 06-07-2014, 03:30 AM
RE: WHAT IS WRONG?!!!!!!!!!!!!! - by Mudbill - 06-07-2014, 12:36 PM
RE: WHAT IS WRONG?!!!!!!!!!!!!! - by ProyectV - 06-07-2014, 03:41 PM
RE: WHAT IS WRONG?!!!!!!!!!!!!! - by Mudbill - 06-07-2014, 05:58 PM



Users browsing this thread: 1 Guest(s)