Summary
The basic_interactable_component doesn’t execute the Cooldown:interactable_cooldown when we also have an InteractableDuration set, the ExpiredEvent is never called and RemainingDuration doesn’t change. The interactabilitiy state isn’t blocked either while the cooldown is supposed to be in effect.
My subclassed component is has a Cooldown assigned with a value >0.0, it also has an InteractionTime assigned >0.0. Everything required for Cooldown to work should be active.
Please select what you are reporting on:
Unreal Editor for Fortnite
What Type of Bug are you experiencing?
Scene Graph
Steps to Reproduce
interact_test<public> := class<final_super>(basic_interactable_component):
var Cancelables : []cancelable = array{}
OnBeginSimulation<override>():void =
(super:)OnBeginSimulation()
set Cancelables = array:
SucceededEvent.Subscribe(OnInteractionSucceeded)
OnEndSimulation<override>():void =
(super:)OnEndSimulation()
for (Cancelable : Cancelables):
Cancelable.Cancel()
set Cancelables = array{}
OnInteractionSucceeded<private>(Agent:agent):void =
Print("Interaction succeeded!")
spawn {WaitForCooldown()}
WaitForCooldown<private>()<suspends>:void =
if (TheCooldown := Cooldown?):
var Active : logic = true
branch:
loop:
if (not Active?):
break
else:
Print("{TheCooldown.RemainingDuration}")
Sleep(0.1)
TheCooldown.ExpiredEvent.Await()
Print("Expired")
set Active = false
Expected Result
Print(“{TheCooldown.RemainingDuration}”) should countdown from Cooldown.Duration to 0.0, and I expect to see “Expired” printed.
Observed Result
Print(“{TheCooldown.RemainingDuration}”) always prints 0.0, ExpiredEvent never gets called.
Platform(s)
Windows