Hello! I’m trying to add time between when my function is healing the player and it is saying “This invocation calls a function that has the ‘suspends’ effect, which is not allowed by its context.” but when I add suspends to it it breaks my call for it in OnBegin I’m not sure what’s wrong with it, thanks!
HealPlayer(Agent : agent) : void =
for (Number := 0..5):
Sleep(2.0) # Sleep isn't working here
if (Player := player[Agent]):
if (FortniteCharacter : fort_character = Player.GetFortCharacter[]):
FortniteCharacter.Heal(10.0)
SpawnHealingZone()<suspends> : void =
Sleep(5.0)
HealZone.Enable()
# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=
HealZone.AgentEntersEvent.Subscribe(HealPlayer) # When I add suspends to HealPlayer it breaks here
DamagePlayer()
SpawnHealingZone()