Frictional Games Forum (read-only)
Help on Triggering a function !!! - 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)
+--- Thread: Help on Triggering a function !!! (/thread-53834.html)



Help on Triggering a function !!! - PeterP - 07-31-2017

Hello there, I am working on a mod and I ran into a problem...

It may not even be possible, or maybe really easy and I am just dumb for not seeing it, but I really really want to add it in my mod and I have been trying to apply it for days with no results. I have added everything else I want and now I cannot continue without doing it -- or aborting it --

I want to trigger a function when any enemy gets within attack range to the player and I really thought it was simple but I appear to be unable to find it. Can anybody please help?

Note that the mod is a Full Conversion, so you can use the .cfg files in your solution. If anybody knows how to do this, please help. Thanks for your time everyone! ^.-


RE: Help on Triggering a function !!! - Mudbill - 07-31-2017

Hmm, I have a theory, but I'm not sure.
If it's possible to attach an entity to the player, you can attach a large, invisible cylinder and then use a collide callback with the enemy and the cylinder. If anyone knows if such attachments work, I think this could be worth trying, but I haven't touched on this particular aspect before so I don't know.


RE: Help on Triggering a function !!! - PeterP - 07-31-2017

Alright thanks I will try something along those lines, however I am not experienced with this stuff, I can only pray that I will make it work! Thanks again! ^.-