Two problems - 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: Two problems (/thread-19539.html) Pages:
1
2
|
RE: Two problems - Storfigge - 12-19-2012 (12-19-2012, 11:57 AM)beecake Wrote: Ah! It's because it's SetEnemyDisableTriggersI don't get any errors now but the monsters keep chasing me even though I've enter the CollideArea so their chase music keeps playing I wrote it like this void OnStart() { AddEntityCollideCallback("Player", "SpawnMonsters", "SpawnFunction_1", false, 1); AddEntityCollideCallback("Player", "SpawnMonsters_2", "SpawnFunction_2", false, 1); AddEntityCollideCallback("Player", "SpawnMonsters_3", "SpawnFunction_3", false, 1); AddEntityCollideCallback("Player", "SpawnMonsters_4", "SpawnFunction_4", false, 1); AddEntityCollideCallback("Player", "SpawnMonsters_5", "SpawnFunction_5", false, 1); AddEntityCollideCallback("Player", "Start_Credits", "Main_Credits", false, 1); AddEntityCollideCallback("Player", "DisableMonster", "Disable", true, 1); } void SpawnFunction_1(string &in asParent, string &in asChild, int alState) { SetEntityActive("grunt_1", true); ShowEnemyPlayerPosition("grunt_1"); SetEntityActive("grunt_2", true); ShowEnemyPlayerPosition("grunt_2"); } void SpawnFunction_2(string &in asParent, string &in asChild, int alState) { SetEntityActive("grunt_3", true); ShowEnemyPlayerPosition("grunt_3"); SetEntityActive("grunt_4", true); ShowEnemyPlayerPosition("grunt_4"); } void SpawnFunction_3(string &in asParent, string &in asChild, int alState) { SetEntityActive("grunt_5", true); ShowEnemyPlayerPosition("grunt_5"); SetEntityActive("grunt_6", true); ShowEnemyPlayerPosition("grunt_6"); } void SpawnFunction_4(string &in asParent, string &in asChild, int alState) { SetEntityActive("grunt_7", true); ShowEnemyPlayerPosition("grunt_7"); SetEntityActive("grunt_8", true); ShowEnemyPlayerPosition("grunt_8"); } void SpawnFunction_5(string &in asParent, string &in asChild, int alState) { SetEntityActive("grunt_9", true); ShowEnemyPlayerPosition("grunt_9"); SetEntityActive("grunt_10", true); ShowEnemyPlayerPosition("grunt_10"); } void Main_Credits(string &in asParent, string &in asChild, int alState) { FadeOut(2); PlayMusic("Music.ogg", false, 1, 1, 1, false); StartCredits("what's going on.ogg", true, "Ending", "MainCredits", 9001); } void Disable(string &in asParent, string &in asChild, int alState) { SetEnemyDisableTriggers("grunt_1", true); SetEnemyDisableTriggers("grunt_2", true); SetEnemyDisableTriggers("grunt_3", true); SetEnemyDisableTriggers("grunt_4", true); SetEnemyDisableTriggers("grunt_5", true); SetEnemyDisableTriggers("grunt_6", true); SetEnemyDisableTriggers("grunt_7", true); SetEnemyDisableTriggers("grunt_8", true); SetEnemyDisableTriggers("grunt_9", true); SetEnemyDisableTriggers("grunt_10", true); } void OnEnter() { } void OnLeave() { } RE: Two problems - FlawlessHappiness - 12-19-2012 -Check names. -Try putting AddDebugMessage("ScriptWorks", false); inside void Disable (Remember to tick "Show Debug Messages" in the debug menu in amnesia. -If it doesn't work, i guess there's no other solution than when the monster has seen you, with the ShowEnemyPlayer script you cannot stop it with anything else than SetEntityActive RE: Two problems - Storfigge - 12-19-2012 (12-19-2012, 12:39 PM)beecake Wrote: -Check names. But I don't understand why do they keep chasing me even though they can't see or reach me? RE: Two problems - FlawlessHappiness - 12-19-2012 ShowEnemyPlayerPosition is like removing the walls for the monsters, and giving the infinite sight range (I guess) It's not doing that, but that's how it feel. You could have 5 walls between you and the monster, and we would still see you... RE: Two problems - Storfigge - 12-19-2012 (12-19-2012, 02:02 PM)beecake Wrote: ShowEnemyPlayerPosition is like removing the walls for the monsters, and giving the infinite sight range (I guess) But I've done that on another map. I walk up to a door and suddenly a brute starts to smash it. Then if you run and hide behind a crate it will stop until it sees you again... That's what confuses me. RE: Two problems - FlawlessHappiness - 12-19-2012 Then i don't know... I've never used that line RE: Two problems - Storfigge - 12-19-2012 (12-19-2012, 02:58 PM)beecake Wrote: Then i don't know... The thing is that I want the grunts to run towards me when they see me instead of walk. Someone told me to do the ShowEnemyPlayerPosition code to make that happen. RE: Two problems - FlawlessHappiness - 12-19-2012 Yea it works fine... How about instead of stopping the triggers on the grunt, then just setting it inactive, and then activate a new grunt? RE: Two problems - Your Computer - 12-19-2012 (12-19-2012, 03:58 PM)Storfigge Wrote: The thing is that I want the grunts to run towards me when they see me instead of walk. For that just edit the grunt entity so that its default speed is fast enough to initiate the run animation and possibly also decrease the minimum speed for the run animation. |