I’m trying to activate this knockback event when a player is damaged but I have no idea how to integrate the two
using { /Fortnite.com/Devices }
using { /Fortnite.com/Playspaces }
using { /Fortnite.com/Teams }
using { /Fortnite.com/Game }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }
using { /Verse.org/Verse }
using { /Verse.org/Native }
using { /Verse.org/Random }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
A bunch of your code fell outside the format block so its unclear if this is the complete code and also unclear what scope/indent some of it is on — just fyi.
side question - Is it common to use empty IF:s to execute a decide expressions?
What is the expected behavior and how is it acting now? If you click the button does it knock you back? If this method of player moving is proven then do you have any other verse build errors?
You wrote MM.Activate(), wouldn’t it be MM_Mover? Did you mean Enable as in creative_device? Not sure how the build process wouldn’t have brought this to your attention, but maybe you have an MM class level var
using { /Fortnite.com/Devices }
using { /Fortnite.com/Playspaces }
using { /Fortnite.com/Teams }
using { /Fortnite.com/Game }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }
using { /Verse.org/Verse }
using { /Verse.org/Native }
using { /Verse.org/Random }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
Yes, when you click the button it knocks the player back (well forward at the moment and I’m working to fix that), I’m trying to activate this “knockback” when a player is damaged through -
Pretty sure your logic is failing at this spot ^ Add your call to
MM_Mover.ActivateKnockBackEffect(agent) under that if:
Those static variables InstigatorCharacter := .. inside this if expression are only accessible within the scope of the proceeding block, what was the goal with this line of code?
You cast it as player but never use it player[InstigatorCharacter.GetAgent[]]
I didn’t test it specifically but try something like this?
edit: Not sure its a great “Pattern” long term but to answer the question / title specifically you could pretend to be a button and call OnButtonClick() there too