SetEntityPlayerLookAtCallback Problem - 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: SetEntityPlayerLookAtCallback Problem (/thread-8991.html) |
SetEntityPlayerLookAtCallback Problem - MrCookieh - 07-06-2011 Hello guys! Here's my problem: If you look at an arm, lying in the drawer, the SetEntityPlayerLookAtCallback should trigger. Now you can't see the arm (because it's in the drawer, which is closed), but the function gets called, and triggers my actions. Is there any way to only run the function, if I really can SEE the arm, and not looking at the point where the arm is (Doesn't matter if you see it or not)? RE: SetEntityPlayerLookAtCallback Problem - Apjjm - 07-07-2011 (07-06-2011, 10:45 PM)MrCookieh Wrote: Hello guys! No, but from your situation what you really want to happen is to alter the sanity when the drawer is opened, right? There are probably several ways to do this, but a collision callback between the chest-of-drawers entity and a script area (positioned such that it is triggered when the drawer with the arm is pulled out) should achieve this in a very simple, robust manner without creating new entities. For example: Code: void OnStart() You might also want to look at CH01/11_study.hps for how the scripted skulls sanity effect is done (note that the desk entity is split into a desk & a desk door, which isn't the case for drawers). RE: SetEntityPlayerLookAtCallback Problem - Paulpolska - 07-07-2011 I was have similar problem. You must for example next to drawer create area which is called when drawer is ejected. After SetEnttiyActive (arm) on true and call SetEntityPlayerLookAtCallback. Simple (function on function ;p) RE: SetEntityPlayerLookAtCallback Problem - MrCookieh - 07-07-2011 Thanks to both of you, it works perfectly! |