Frictional Games Forum (read-only)
[SOLVED!]"Water Monster" disappears when being spawned! - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SOLVED!]"Water Monster" disappears when being spawned! (/thread-25399.html)



[SOLVED!]"Water Monster" disappears when being spawned! - Radical Batz - 06-01-2014

So I have this room with a water area and water plane of course which doesn't collide and wanted to make a water monster appear after picking up a certain key. Then when entering that area, the water monster appears to spawn with the sound and music as usual but then at that second the water monster disappears.

Is it because it falls trough he floor or something cause this is what it looks like, I made it stand on the floor.

Spoiler below!
[Image: u4gymv9.png]

Does it matter how big the water level is, it's isn't that big as you can see in the pic.


RE: "Water Monster" disappears when being spawned! - Romulator - 06-01-2014

IIRC, the Water monster will only move when/where there are assigned pathnodes for it.


RE: "Water Monster" disappears when being spawned! - Radical Batz - 06-01-2014

(06-01-2014, 01:21 PM)Romulator Wrote: IIRC, the Water monster will only move when/where there are assigned pathnodes for it.

But there are already path-nodes for him to follow, are you sure you saw the image?


RE: "Water Monster" disappears when being spawned! - Romulator - 06-01-2014

I mean, have you assigned them in script?


RE: "Water Monster" disappears when being spawned! - Radical Batz - 06-01-2014

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

Yes!

This is my hps file.

PHP Code:
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()
{
    




RE: "Water Monster" disappears when being spawned! - Romulator - 06-01-2014

Just looking at Frictional Games' water monster map (Old Archives), there is a water area surrounding the map. Do you have that as well?

If that's there, then I got no idea myself.


RE: "Water Monster" disappears when being spawned! - Radical Batz - 06-01-2014

(06-01-2014, 03:47 PM)Romulator Wrote: Just looking at Frictional Games' water monster map (Old Archives), there is a water area surrounding the map. Do you have that as well?

If that's there, then I got no idea myself.

Actually I already have a water area but this thread should be closed now, since I decided not to use the water monster anymore, got a new idea. So yeah, but thnx for helping me tough.


RE: "Water Monster" disappears when being spawned! - DnALANGE - 06-01-2014

Closed?
Ask a Moderator to CLOSE the tread...
OR
Simply add SOLVED, so ppl wont get in here and the tread will get out of sight soon.