![]() |
Scripting a LookAt? - 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 (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: Scripting a LookAt? (/thread-6300.html) |
Scripting a LookAt? - Linus Ågren - 01-20-2011 Well, I have tried scripting a LookAt event, but it doesn't work. What's wrong with this script? The Monster Spawn is working perfectly btw. Code: void CollideAreaMonster(string &in asParent, string &in asChild, int alState) RE: Scripting a LookAt? - jens - 01-20-2011 AddEntityCollideCallback("Player", "corpseScare" , "corpses_scare" , true , 1); Is meant to be? AddEntityCollideCallback("Player", "corpseScare" , "CollideAreaMonster" , true , 1); RE: Scripting a LookAt? - Linus Ågren - 01-20-2011 Nope, no differance =/ It worked without the timer, but then my char would look at that place forever. RE: Scripting a LookAt? - Vradcly - 01-20-2011 I did like this, maybe you can find what is missing by comparing? AddEntityCollideCallback("Player", "Torso_area1", "CollideTorso_area1", true, 1); void CollideTorso_area1(string &in asParent, string &in asChild, int alState) { AddDebugMessage("Looking at torso", false); StartPlayerLookAt("corpse_male_1", 10, 10, ""); AddTimer("stoplook", 25.0f, "TimerStopLook"); } void TimerStopLook(string &in asTimer) { AddDebugMessage("Stoped looking", false); StopPlayerLookAt(); } Im getting confused by your code so I cant say exactly what you have to do, hopefully that will help ![]() RE: Scripting a LookAt? - Seragath - 01-21-2011 Code: void CollideAreaMonster(string &in asParent, string &in asChild, int alState) The mistake is that the timer will trigger in 0.5 seconds. change it to the same as the amount the StartLookingAt is. |