Frictional Games Forum (read-only)
Why does my monster keep spinning around? - 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: Why does my monster keep spinning around? (/thread-13726.html)



Why does my monster keep spinning around? - GrAVit - 03-03-2012

Hey, my brute keeps spinning around after a script command enables it. I do have pathnodes set. I don't know what's causing this. Help?


RE: Why does my monster keep spinning around? - Shives - 03-03-2012

Could you show me your script?
Maybe I can find the mistake



RE: Why does my monster keep spinning around? - Strembitsky - 03-03-2012

If he spawns in your vision, he will spawn in a specific direction and then have to turn around. When I had this problem, in order for myself to get around it, I just made the monster spawn behind a door in front of me.


RE: Why does my monster keep spinning around? - GrAVit - 03-04-2012

(03-03-2012, 06:23 PM)Shives Wrote: Could you show me your script?
Maybe I can find the mistake

Code:
void OnStart()
{
PlayMusic("06_amb.ogg", true, 1, 0.1, 0, true);
SetEntityPlayerInteractCallback("lantern_2", "Pickup_1", true);
SetEntityPlayerInteractCallback("rusty", "Pickup_3", true);
AddEntityCollideCallback("Player","ScriptArea_1","DoorSlam",true,1);
AddEntityCollideCallback("Player","lost","morsogone",true,1);
AddEntityCollideCallback("Player","ScriptArea_2","StopLurker",true,1);
AddEntityCollideCallback("Player","nicolas","laugh",true,1);
SetEntityPlayerLookAtCallback("Jukka", "Jukkascare", true);
AddUseItemCallback("", "key_study_1", "cellar_wood01_slow_10", "unlockhena", true);
SetEntityPlayerInteractCallback("key_study_1", "Pickup_2", true);
SetPlayerLampOil(0.0f);
for (int x = 0; x < 91; x++) {
  AddEnemyPatrolNode("waterlurker_1", "PathNodeArea_"+x, 0, "");
}
for (int x = 0; x < 37; x++) {
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_"+x, 0, "");
}
}
void Pickup_1(string &in asEntity)
{
if(asEntity == "lantern_2")
SetPlayerLampOil(25.0f);
SetEntityActive("ScriptArea_1", true);
SetSwingDoorLocked("prison_section_plain_2", false, true);
}
void DoorSlam(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("prison_section_plain_2", 10, 100, "");
SetSwingDoorDisableAutoClose("prison_section_plain_2", true);
SetSwingDoorClosed("prison_section_plain_2", false, true);
AddPropForce("prison_section_plain_2",0,0,1200,"world");
PlaySoundAtEntity("", "close_gate.snt", "prison_section_plain_2", 0, false);
GiveSanityDamage(20, true);
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
FadeImageTrailTo(3, 1);
FadeSepiaColorTo(5, 1);
FadePlayerFOVMulTo(0.7, 0.05);
AddTimer("timerReset", 1.0f, "TimerReset");
}
void TimerReset(string &in asTimer)
{
ChangePlayerStateToNormal();
StopPlayerLookAt(); FadeImageTrailTo(0, 1);
FadeSepiaColorTo(0, 1);
//FadeRadialBlurTo(0, 1);
FadePlayerFOVMulTo(1, 0.01f); SetPlayerMoveSpeedMul(1);
SetPlayerRunSpeedMul(1);
SetPlayerLookSpeedMul(1);
}
void Pickup_2(string &in asEntity)
{
StartPlayerLookAt("waterlurker_1", 10, 100, "");
SetEntityActive("waterlurker_1", true);
PlayMusic("07_amb.ogg", true, 1, 4.0f, 0, true);
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
GiveSanityDamage(30, true);
AddTimer("timerReset", 0.6f, "TimerResetPlayer");
SetEntityActive("ScriptArea_2", true);
}
void TimerResetPlayer(string &in asTimer)
{
ChangePlayerStateToNormal();
StopPlayerLookAt();
SetPlayerMoveSpeedMul(1);
SetPlayerRunSpeedMul(1);
SetPlayerLookSpeedMul(1);
}
void unlockhena(string &in item, string &in door)
{
    SetSwingDoorLocked("cellar_wood01_slow_10", false, true);
    PlaySoundAtEntity("", "unlock_door", "cellar_wood01_slow_10", 0, false);
    RemoveItem("key_study_1");
}
void StopLurker(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("waterlurker_1",false);
StopMusic(2, 1);
PlayMusic("06_amb.ogg", true, 1, 2.0f, 0, true);
}
void Jukkascare(string &in asEntity, int alState)
{
StartPlayerLookAt("Jukka", 10, 100, "");
GiveSanityDamage(35, true);
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
FadeImageTrailTo(3, 1);
FadeSepiaColorTo(5, 1);
FadePlayerFOVMulTo(0.7, 0.05);
AddTimer("timerReset", 1.5f, "TimerJukka");
}
void TimerJukka(string &in asTimer)
{
ChangePlayerStateToNormal();
StopPlayerLookAt(); FadeImageTrailTo(0, 1);
FadeSepiaColorTo(0, 1);
//FadeRadialBlurTo(0, 1);
FadePlayerFOVMulTo(1, 0.01f); SetPlayerMoveSpeedMul(1);
SetPlayerRunSpeedMul(1);
SetPlayerLookSpeedMul(1);
}
void laugh(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "nicolas", "Player", 0, false);
GiveSanityDamage(10, true);
}
void Pickup_3(string &in asEntity)
{
AutoSave();
SetEntityActive("miekkamorso", true);
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
GiveSanityDamage(8, true);
SetEntityActive("lost", true);
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_102", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_100", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_101", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_99", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_128", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_98", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_97", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_96", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_95", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_94", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_92", 2, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_93", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_103", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_104", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_105", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_106", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_107", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_108", 1, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_109", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_111", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_112", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_110", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_113", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_114", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_115", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_116", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_117", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_118", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_119", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_120", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_121", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_122", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_123", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_124", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_125", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_126", 0, "");
AddEnemyPatrolNode("miekkamorso", "PathNodeArea_127", 0, "");
}
void morsogone(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("miekkamorso", true);
PlayMusic("06_amb.ogg", true, 1, 2.0f, 0, true);
}



RE: Why does my monster keep spinning around? - GrAVit - 03-05-2012

Any help? I would really want to get this problem solved.


RE: Why does my monster keep spinning around? - Strembitsky - 03-05-2012

(03-03-2012, 06:57 PM)Strembitsky Wrote: If he spawns in your vision, he will spawn in a specific direction and then have to turn around. When I had this problem, in order for myself to get around it, I just made the monster spawn behind a door in front of me.

Another protip: Don't make the monsters materialize out of thin air.

EDIT: I think I may have read your main problem wrong. Are you saying that he just keeps on spinning, and doesn't stop? Or he spins for a second and then comes after you?


RE: Why does my monster keep spinning around? - GrAVit - 03-08-2012

(03-05-2012, 05:39 PM)Strembitsky Wrote: Another protip: Don't make the monsters materialize out of thin air.

EDIT: I think I may have read your main problem wrong. Are you saying that he just keeps on spinning, and doesn't stop? Or he spins for a second and then comes after you?
He spins till he notices me.