setEntityPlayerLookAtCallback 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: setEntityPlayerLookAtCallback problems (/thread-30169.html) |
setEntityPlayerLookAtCallback problems - Rahmerh - 06-26-2015 Hey! I'm having a (probably) very stupid problem with the lookatcallback. I'm trying to make a message pop up when a player looks at an entity, but it's not working. Here's my code: Code: void OnStart(){ I also tried it through the hpl editor, but that doesn't work either. Does anyone have an ideas? I tried this with a script area and the entity. Thanks in advance! RE: setEntityPlayerLookAtCallback problems - Romulator - 06-26-2015 Could you also post your extra_english.lang file? There may be an issue with that, considering that one error in that causes the whole language file to screw up - including your messages RE: setEntityPlayerLookAtCallback problems - Rahmerh - 06-26-2015 Yeah I just found out it was my .lang file... Forgot the capital E in 'Entry'... I'm pretty stupid sometimes... RE: setEntityPlayerLookAtCallback problems - Romulator - 06-26-2015 Ahh, no problem! Things like this happen. Also remember that nothing when you code or what you do is "stupid" coding. Every small mistake helps you become just that little bit better. Let us know if you have any more problems! RE: setEntityPlayerLookAtCallback problems - Rahmerh - 06-26-2015 Will do! Another quick question though, when I look at the area, it displays the message, but when I look away from it, it shows again. Is there a way to make it so it only appears when you look at it, not when you look away from it? RE: setEntityPlayerLookAtCallback problems - Romulator - 06-26-2015 Yep! We use an if conditional here. Try this: PHP Code: void barLoose(string &in asEntity, int alState) RE: setEntityPlayerLookAtCallback problems - Rahmerh - 06-26-2015 Thank you very much! RE: setEntityPlayerLookAtCallback problems - Romulator - 06-26-2015 (06-26-2015, 01:46 PM)Rahmerh Wrote: Thank you very much! No problem! Good luck! Edit: It's actually a topic stuck in my head since I had that problem two days ago :3 |