GetProperty Maximum Distance returns 0.0

I am trying to get the maximum distance of an event in UE4 so that I can turn a custom occlusion engine on and off if the object is outside the audible range. However, using GetProperty in a Blueprint only returns 0.0 for Maximum distance. Is there something I am missing here?

Thank you!

The getProperty function is used to get a struct of the properties of the event which you can then override and then use setProperty to override the properties the event currently has.

You should be able to get the min/max distance settings by using EventDescription::getMinMaxDistance().

https://www.fmod.com/resources/documentation-api?version=2.02&page=studio-api-eventdescription.html#studio_eventdescription_getminmaxdistance

Thank you Richard.

After some serious digging I did come to realize that getting min/max distance would have to be done through the Studio API and not blueprints.

However, I am having a really hard time getting the API to work. I have the plug-in set up but everytime I try to include fmod_studio.hpp, if can’t be found. I feel like I must either be including that in the wrong place or I am just totally missing something. I have also tried putting FMODStudio in the private and public locations in the build scripts but that doesn’t seem to work either. I am not new to code but i am new to game code structure. Do you have any insights on how to get access to the API?

Thanks for your help!

S

Have you tried setting up the UE4 project as described in the documentation? There’s a section on adding elements to the Build.cs file.

https://www.fmod.com/resources/documentation-ue4?version=2.02&page=user-guide.html#programming-support

Hey Richard

I finally got it working. I needed to rebuild the visual studio project from inside Unreal in order for FMOD to place all the dependencies in the right place. The manual was correct in that I needed to put FMODStudio in the build.cs file but the fact that I needed to do a rebuild after that was something I was not aware of.

Thanks!

S