Please select what you are reporting on:
Unreal Editor for Fortnite
What Type of Bug are you experiencing?
Verse
Summary
The Damage() function does not deal the specified amount of damage to a Creature when placing a “Creature Manager Device” that specifies an amount in the “Damage to Player” field. Instead, it always defaults to dealing damage based on the value that is specified in the “Damage to Player” field of the “Creature Manager Device”.
Steps to Reproduce
- Place a Creature Manager Device in the Level
- Set the Creature Manager Device to “Creature Type = Fiend”, enable the “Damage to Player” field and set the value to 1.0
- Place a Creature Spawner Device in the Level, set “Spawner Type” to be “Cube Spawner” and “Creature Type” to be “Fiend”
- Creatue a custom verse device
4.1 The Verse device subscribes to the SpawnedEvent in the Creature Spawner
4.2 On Spawned, get the corresponding fort_character of the spawned Fiend Creature
4.3 Spawn a function that takes the fort_character as an argument. In a loop block, it deals 50.0 damage per second to the spawned Creature using the Damage() function
4.4 It does not matter whether damage_args are specified when calling the Damage function. You can either call Damage(50.0) or Damage(damage_args{Amount:=50.0})
4.5 For any spawned Creature, subscribe to its DamagedEvent delegate
4.6. When the Creature is damaged, Print() the damage_result.Amount
Expected Result
The printed damage_result.Amount is 50.0 (as specified in the Damage() call)
Observed Result
The printed damage_result.Amount is 1.0 (or whichever value is specified in the “Damage to Player” field of the Creature Manager Device)
Platform(s)
UEFN
Additional Notes
This is the verse code that I used to test this behavior:
using { /Fortnite.com/Characters }
using { /Fortnite.com/Devices }
using { /Fortnite.com/Game }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
damage_test_device := class(creative_device):
@editable CreatureSpawner : creature_spawner_device = creature_spawner_device{}
OnBegin<override>()<suspends>:void=
CreatureSpawner.SpawnedEvent.Subscribe(OnSpawned)
OnSpawned(Agent : agent):void=
if(FChar := Agent.GetFortCharacter[]):
spawn{DamageOverTime(FChar)}
FChar.DamagedEvent().Subscribe(OnCreatureDamaged)
DamageOverTime(Creature : fort_character)<suspends>:void=
loop:
Sleep(1.0)
Creature.Damage(50.0)
OnCreatureDamaged(Result : damage_result):void=
Print("{Result.Amount}") #with a creature manager device in the level that specifies "Damage to Player" for this creature type, the Result.Amount will always default to that value
1 post - 1 participant