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
[SOLVED!]"Water Monster" disappears when being spawned!
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#5
RE: "Water Monster" disappears when being spawned!

(06-01-2014, 01:40 PM)Romulator Wrote: I mean, have you assigned them in script?

Yes!

This is my hps file.

PHP Code: (Select All)
void OnStart()
{
    
AddEntityCollideCallback("Player""EnterCreakOnArea""FuncCreakHorrors"true1);
    
AddTimer("AreaStep_"RandFloat(3.0f,10.f), "TimerAreaStep");
    
AddTimer("AreaScare_"RandFloat(3.0f,10.f), "TimerAreaScare");
    
AddEntityCollideCallback("Player""Suitortime""Suitortime"true1);
    
AddUseItemCallback("""Crowbar""CrowbarDoor""UseCrowbarOnDoor"true);
    
AddEntityCollideCallback("Joint""AreaBreak""BreakDoor"true1);
    
AddEntityCollideCallback("Suitor""AreaSuitorLeaving""SuitorLeaving"true1);
    
AddEntityCollideCallback("Suitor""AreaSuitorHasEntered""SuitorEntered"true1);
    
AddEntityCollideCallback("Player""AreaStartScare""StartScare"true1);
    
AddEntityCollideCallback("Player""AreaShowBrute""CollideShowBrute"true1);
    
AddEntityCollideCallback("Player""ActiveMonster""MonsterTime"true1);
    
AddEntityCollideCallback("Player""AreaVoiceScene""VoiceScene"true1);
    
AddUseItemCallback("""UnkKey""OpenSesame""UseUnkKeyOnDoor"true);
    
AddUseItemCallback("""RustyHammer""padlock_1""UseExitKeyOnDoor"true);
    
AddEntityCollideCallback("Player""teleport3""changemap"true 1);
    
AddUseItemCallback("""HollowNeed""CellDoor""UseHollowNeedOnDoor"true);
    
AddEntityCollideCallback("Player""ChangeMusic""ChangeMusic"false1);
    
AddEntityCollideCallback("Player""ChangeMusic_1""ChangeMusic2"false1);

}

void ChangeMusic(string &in asParentstring &in asChildint alState)
{
    
PlayMusic("betrayal"true130true);
}

void ChangeMusic2(string &in asParentstring &in asChildint alState)
{
PlayMusic("penumbra_music_E1_A9.ogg"true130true);
}

void CrowbarDoorLocked(string &in asEntity)
{
if (
GetSwingDoorLocked("CrowbarDoor") == true)
{
SetMessage("Messages""CrowbarDoor"0);
}
}

//--------------------------------------------

 ////////////////////////////////////////////////
//Use Crowbar to open door//
  //////////////////////////////////////////////
  
 //-------------------------------------------

void UseCrowbarOnDoor(string &in asItemstring &in asEntity)
{
    
PlaySoundAtEntity("""player_crouch.snt""Player"0.05false);
    
AddTimer(asEntity0.2"TimerPlaceCrowbar");

}

void TimerPlaceCrowbar(string &in asTimer)
{
    
SetEntityActive("Joint"true);
    
PlaySoundAtEntity("""puzzle_place_jar.snt""Player"0false);
}

void BreakDoor(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("Joint"false);
    
CompleteQuest("Givequest""pickupcrowbar");
    
SetEntityActive("Broken"true);

    
SetSwingDoorLocked("CrowbarDoor"falsefalse);
    
SetSwingDoorClosed("CrowbarDoor"falsefalse);
    
SetSwingDoorDisableAutoClose("CrowbarDoor"true);

    
AddPropImpulse("CrowbarDoor"00, -3"world");

    
CreateParticleSystemAtEntity("""ps_hit_wood.ps""AreaEffect"false);
    
PlaySoundAtEntity("""break_wood_metal""AreaEffect"0false);

    
GiveSanityBoostSmall();

    
PlayMusic("02_puzzle.ogg"false0.70.11false);

    
AddTimer("",0.1,"TimerPushDoor");
}

void TimerPushDoor(string &in asTimer)
{
    
AddPropImpulse("CrowbarDoor"42, -1"world");
    
AddTimer(""1.1"TimerDoorCanClose");
}

void TimerDoorCanClose(string &in asTimer)
{
    
SetSwingDoorDisableAutoClose("CrowbarDoor"false);        
}

//--------------------------------------------

 ////////////////////////////////////////////////
//Give memento and enable Suitorspawnarea when picked up crowbar//
  //////////////////////////////////////////////
  
 //-------------------------------------------

void pickitupfool(string &in asEntityNamestring &in asType)
{
    
SetEntityActive("Suitortime"true);
    
AddQuest("Givequest""pickupcrowbar");


void PickKey(string &in asEntityNamestring &in asType)
{
    
SetEntityActive("ActiveMonster"true);
}     

void TimerDoorForce(string &in asTimer)
{
    
AddPropForce("cellar_wood01_4"0070"World");

    
AddDebugMessage("Hey!"false);
    if(
asTimer == "doorforce5")
        
StopSound("SlamDoor"1.0f);
}
void Suitortime(string &in asParentstring &in asChildint alState)
{
 
SetEntityActive("Suitor"true);
GiveSanityDamage(10true);                    
 
AddEnemyPatrolNode("Suitor""PathNodeArea_1",0.001f"");
AddEnemyPatrolNode("Suitor""PathNodeArea_8",0.001f"");
AddEnemyPatrolNode("Suitor""PathNodeArea_15",0.001f"");
AddEnemyPatrolNode("Suitor""PathNodeArea_20",0.001f"");
AddEnemyPatrolNode("Suitor""PathNodeArea_24",0.001f"");
AddEnemyPatrolNode("Suitor""PathNodeArea_28",0.001f"");

CheckPoint ("""PlayerStartArea_2""CheckPoint01""Hints""Hint1");
}

void MonsterTime(string &in asParentstring &in asChildint alState)
{
 
SetEntityActive("waterlurker_1"true);
GiveSanityDamage(4true);                    
 
AddEnemyPatrolNode("waterlurker_1""PathNodeArea_52",0.001f"");
AddEnemyPatrolNode("waterlurker_1""PathNodeArea_56",0.001f"");
AddEnemyPatrolNode("waterlurker_1""PathNodeArea_59",0.001f"");
AddEnemyPatrolNode("waterlurker_1""PathNodeArea_62",0.001f"");
AddEnemyPatrolNode("waterlurker_1""PathNodeArea_63",0.001f"");

CheckPoint ("""PlayerStartArea_2""CheckPoint01""Hints""Hint1");
}
void SuitorEntered(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("AreaSuitorLeaving"true);
}
void SuitorLeaving(string &in asParentstring &in asChildint alState)
{
    
PlaySoundAtEntity("""enemy_hallucination_disappear.snt""Player"5.0ffalse);
    
SetEntityActive("Suitor"false);
}


void TimerSanity(string &in asTimer)
{
    
GiveSanityDamage(10true);
}

void TimerAreaStep(string &in asTimer)
{
    
int iRand RandInt(16);

    
PlaySoundAtEntity(asTimer+iRand"scare_wood_creak_walk.snt"asTimer+iRand1false);
    
AddTimer("EndRadial"4.0f"TimerEndRadial");
    
AddTimer(asTimerRandFloat(15.0f30.0f), "TimerAreaStep");
}

void TimerAreaScare(string &in asTimer)
{
    
int iRand RandInt(16);

    
PlaySoundAtEntity(asTimer+iRand"scare_male_terrified.snt"asTimer+iRand1false);
    
AddTimer("EndRadial"4.0f"TimerEndRadial");
    
AddTimer(asTimerRandFloat(15.0f30.0f), "TimerAreaScare");
}

void StartScare(string &in asParentstring &in asChildint alState)
{
    
PlaySoundAtEntity("gruntgruff""scare_male_terrified""AreaStartScare"0.0ffalse);
    
        
AddTimer("sanity"1"TimerSanity");
        
PlaySoundAtEntity("""scare_whine_loop4.snt""Player"5.0ffalse);
        
PlaySoundAtEntity("""general_wind_whirl""AreaScare_4"5.0ffalse);
        
CreateParticleSystemAtEntity("""ps_dust_paper_blow.ps""AreaScare_4"false);
        
        
}

void PickKey(string &in asEntityNamestring &in asType)
{
    
SetEntityActive("AreaShowBrute"true);
    
ResetProp("cellar_wood01_5");
    
AddPlayerSanity(3);    
}

////////////////////////////////////////
// Suitor Appears
void CollideShowBrute(string &in asParentstring &in asChildint alState)
{
    
SetPropHealth("cellar_wood01_5"0);
    
GiveSanityDamage(10true);
    
ShowEnemyPlayerPosition("enemy_suitor_1");            
    
SetEntityActive("enemy_suitor_1"true);    
}

void EntityCallPickDiary(string &in asEntitystring &in type)
{
    
AddLocalVarInt("DiaryNr"1);
    
    if(
GetLocalVarInt("DiaryNr") == 1)
        
PlayMusic("03_paper_village.ogg",false0.7f0.1f9false);
        
AddEffectVoice("voices""VoiceScene2.ogg""Voice""OhFather",
false"Player"11);
        
}

void KeyDoorLocked2(string &in asEntity)
{
if (
GetSwingDoorLocked("OpenSesame") == true)
{
SetMessage("Messages""OpenSesame"0);
}
}

void KeyDoorNeeded(string &in asEntity)
{
if (
GetSwingDoorLocked("DoorExit") == true)
{
SetMessage("Messages""KeyDoorNeeded"0);
}
}

void UseUnkKeyOnDoor(string &in asItemstring &in asEntity)
{
SetSwingDoorLocked("OpenSesame"falsetrue);
PlaySoundAtEntity("""unlock_door.ogg"asEntity0false);
RemoveItem(asItem);
CompleteQuest("cellar_wood01_8""SimpleLock");    
}

void UseExitKeyOnDoor(string &in asItemstring &in asEntity)
{
SetSwingDoorLocked("DoorExit"falsetrue);
SetPropActiveAndFade("padlock_1"false2.0f);
PlaySoundAtEntity("""break_wood_metal.snt"asEntity0false);
CreateParticleSystemAtEntity("ps""ps_break_wood_small.ps""padlock_1"false);
AddPlayerSanity(2);
SetEntityActive("ScriptArea_1"true);

}

void BudgeLocked(string &in asEntity)
{
if (
GetSwingDoorLocked("cellar_wood01_9") == true)
{
SetMessage("Messages""Budge"0);
}
}

void BudgeLocked2(string &in asEntity)
{
if (
GetSwingDoorLocked("cellar_wood01_5") == true)
{
SetMessage("Messages""Budge"0);
}
}

void BudgeLocked3(string &in asEntity)
{
if (
GetSwingDoorLocked("cellar_wood01_7") == true)
{
SetMessage("Messages""Budge"0);
}
}

void Dontgoback(string &in asEntity)
{
if (
GetSwingDoorLocked("Cantgoback") == true)
{
SetMessage("Messages""Cantgoback"0);
}
}

void VoiceScene(string &in asParentstring &in asChildint alState)
{
    
StartPlayerLookAt("VoiceScene"1.01.0"");
    
AddEffectVoice("voices""VoiceScene1.ogg""Voice""OhMan",
false"VoiceScene"11);
AddTimer("StopHeadMove2"4"TimerStopHeadMove2");    
}

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

void TouchPainting(string &in asEntity)
{
    
AddNote("BloodyPaintings""");
    
SetMessage("Messages""Note1"0);
    
PlayGuiSound("journal_page.ogg"1);
}
void OnEnter()
{
    
PlayMusic("penumbra_music_E1_A9"true150true);
}

void OnLeave()
{
    


06-01-2014, 01:41 PM
Find


Messages In This Thread
RE: "Water Monster" disappears when being spawned! - by Radical Batz - 06-01-2014, 01:41 PM



Users browsing this thread: 1 Guest(s)