[Code Plugin] Feedback Event Factory

A Feedback Event Factory is perfect for editing, spawning and managing the following:

  1. Particle Systems
  2. Sounds
  3. Force Feedback
  4. Camera Shakes
  5. Animations
  6. Time Dilation
  7. AI Notifications
  8. and more…

…all within a single Blueprint! Speed up your development process, reduce code complexity and never forget to give the player what they deserve again.

This is amazing! Thank you

THANK YOU! Appreciate it :smiley:

A new build for 4.20 is now available! It contains these updates, among other small tweaks/optimizations under the hood.

  • add support for “stopEventDestroyDelay” on actors spawned from factory
  • add “startTime” option for head/loop/tail audio cues
  • implemented HasActiveEvents, PlayEvents & StopEvents as BlueprintNativeEvent functions so developers can add custom feedback events for their projects
  • add support for stopping looping camera shakes in StopEvents

New build for 4.21 is now live!

4.22 is now live with new features!

  • Added support for holding time dilation until StopEvents is called and then specify new curve for easing out
  • Added support for time dilation ignoring entire actor classes and specific actors
  • Updated variable names to follow Epic coding standards (i.e. no camelCase)

Thank you Ryan! :slight_smile:

I select FET All but i only see it on owner. Just to clarify im using the Spawn Feedback Event Factory function. if i place it in lvl and play it it works fine.

TLDR; For general networking optimization reasons, you must manually replicate the spawning of every Feedback Event Factory just like you would manually replicate the spawning of a particle effect or sound effect.

Hey, bok! The “FET_All” setting simply means that the event has no filter and will play for ALL clients that spawn the Feedback Event Factory.

As a different example, if you chose “FET_Owner”, the event would only play for the owner assigned to it, even if you spawn the Feedback Event Factory on all clients.

The most common use case for stuff like this is when you have one effect you want to play in first person for the owner and then a separate effect to play for everyone else (e.g. a muzzle flash effect that has a lot of detail in first person with non-spatialized audio, and then a different less detailed effect with spatialized audio).

Hopefully that makes sense. This is a more advanced feature that I typically use when fine tuning effects for 1st person (Owner) versus 3rd person (NonOwner).

Thanks for quick reply :smiley: makes sense and I got it working.

Can you also asign a Camera Shake to a CineCameraActor inside of the Sequencer?
I am trying to find a solution for this problem demonstrating in this short video:

Followed up on Twitter w/ your question, but just to keep info in one spot…

I actually don’t have tons of experience working with sequencers and my Feedback Event Factory plugin doesn’t explicitly interface with them. I think your issue is related to basic camera shake support and I suggest reading up more on that topic

The 4.23 update is now live!

This includes a significant optimization pass that opens up new “Fast” spawn variants. The TLDR is that these new “Fast” variants don’t spawn a new Feedback Event Factory actor; they just spawn the events associated with the factory and populate a struct handle (FActiveFactoryInfo) with information about the newly spawned events.

I did my best to ensure that there would be minimal work required to upgrade to this new version, but please note that this update may require some changes to your project. Specifically, info about active events (e.g. audio components, particle system components, etc.) now live in a FActiveFactoryInfo struct on the Feedback Event Factory rather than directly on the Feedback Event Factory actor itself.

More details on how to simply spawn these “Fast” variants can be found here:

Hello Ryan,

I have being on an older version of UE for a while and while updating to 4.23, I have a repro crash out of PIE play session or in build with Feedback Factory plugin mentioned. I implemented some simple events on Hit so that I have rumble, some camera shakes. It always crashes whenever a FFevent is triggered (after a few 2 /3 to be clear).
Since you mention some changes in 4.23, I do not remember having to add anything on begin play previously, it could just be that or somethign else?
This is the crash log:

Assertion failed: ValidActiveInfo != nullptr && ValidActiveInfo->IsValid() [File:D:/Build/++Portal+Dev-Marketplace+Full/Sync/LocalBuilds/PluginTemp/HostProject/Plugins/FeedbackEventFactory/Source/FeedbackEventFactory/Private/FeedbackEventFactory.cpp] [Line: 280]
0x00007ffc681ca839 KERNELBASE.dll!UnknownFunction ]
0x00007ffbd6a2a367 UE4Editor-Core.dll!UnknownFunction ]
0x00007ffbba98c709 UE4Editor-FeedbackEventFactory.dll!AFeedbackEventFactory::GetUniqueForceFeedbackName() [d:\build++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\feedbackeventfactory\source\feedbackeventfactory\private\feedbackeventfactory.cpp:280]
0x00007ffbba98cfee UE4Editor-FeedbackEventFactory.dll!AFeedbackEventFactory::HasActiveEvents_Implementation() [d:\build++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\feedbackeventfactory\source\feedbackeventfactory\private\feedbackeventfactory.cpp:345]
0x00007ffbba986a87 UE4Editor-FeedbackEventFactory.dll!AFeedbackEventFactory::execHasActiveEvents() [d:\build++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\feedbackeventfactory\source\feedbackeventfactory\classes\feedbackeventfactory.h:498]
0x00007ffbd5e484b8 UE4Editor-CoreUObject.dll!UnknownFunction ]
0x00007ffbd2a4aa33 UE4Editor-Engine.dll!UnknownFunction ]
0x00007ffbba998069 UE4Editor-FeedbackEventFactory.dll!AFeedbackEventFactory::HasActiveEvents() [d:\build++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\feedbackeventfactory\intermediate\build\win64\ue4editor\inc\feedbackeventfactory\feedbackeventfactory.gen.cpp:1451]
0x00007ffbba98f355 UE4Editor-FeedbackEventFactory.dll!AFeedbackEventFactory::PlayEvents_Implementation() [d:\build++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\feedbackeventfactory\source\feedbackeventfactory\private\feedbackeventfactory.cpp:603]
0x00007ffbd5e484b8 UE4Editor-CoreUObject.dll!UnknownFunction ]
0x00007ffbd2a4aa33 UE4Editor-Engine.dll!UnknownFunction ]
0x00007ffbba994009 UE4Editor-FeedbackEventFactory.dll!AFeedbackEventFactory::SpawnFeedbackEventFactoryAttachedToComponent() [d:\build++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\feedbackeventfactory\source\feedbackeventfactory\private\feedbackeventfactory.cpp:1148]
0x00007ffbba993b6f UE4Editor-FeedbackEventFactory.dll!AFeedbackEventFactory::SpawnFeedbackEventFactoryAttachedToActor() [d:\build++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\feedbackeventfactory\source\feedbackeventfactory\private\feedbackeventfactory.cpp:1091]
0x00007ffbba98702a UE4Editor-FeedbackEventFactory.dll!AFeedbackEventFactory::execSpawnFeedbackEventFactoryAttachedToActor() [d:\build++portal+dev-marketplace+full\sync\localbuilds\plugintemp\hostproject\plugins\feedbackeventfactory\source\feedbackeventfactory\classes\feedbackeventfactory.h:498]

Sorry to hear that! Can you please post a picture of the blueprint controlling this logic or copy/paste relevant code?

If you can also send me a pic of what your Force Feedback settings are in the FEF, that’d be helpful, as well.

Hi Ryan,

Here are screenshots. The spawn event node did not have the promoted variable in 4.21. I have added it after looking at your documentation for the update changes. I have also added a delay and a destroy event but it still crashed (although it took a little longer)

@sweetdardo thanks for the additional info! There should be a fix for this in the 4.24 release that I’ve already submitted to Epic. If it’s critical for you to get a fix in 4.23, let me know and I’ll get one submitted. The 4.24 release will come just as quick, if not quicker since it’s already in the pipe.

I’m gonna guess it won’t crash if you remove the Force Feedback for now :confused: Sorry about that!

Thanks For Getting Back to me Ryan. I am not yet moving to 4.24, most of the assets/plugins I use have not been updated. Plus there is the fact that 4.24 is still quite unstable and buggy in quite a few areas so I will probably wait for a few more HotFixes before even attempting it. If you could submit a fix 4.23 that`d be very much appreciated. Did you actually found what the issue is?

Yes, AFeedbackEventFactory::HasActiveEvents_Implementation() needs an early out at the top of the function like this:


bool AFeedbackEventFactory::HasActiveEvents_Implementation() const
{
    const FActiveFactoryInfo* ValidActiveInfo = GetValidActiveInfoConst();

**    if (!ValidActiveInfo->IsValid())
        return false;**

    ...



If you are building from code that’s a quick 2 line change for you. I should be able to get a 4.23 update out, but it’s just gonna take a while w/ most, if not all, of Epic on vacation for the holidays :confused: