Reference ID
0c785e16-4866-ffe9-74c2-8e86b0357ecf
Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
Verse
Summary
If you are dealt damage via Verse code the instigator will be the fort_character even though in Fortnite.Digest.Verse it states for the Instigator “Player, agent, etc. that instigated the damage to Target
. Can be false when damage is instigated by code, the environment, etc.”
Steps to Reproduce
- Create a verse file and make the verse code run a function when a fort_character is damaged (Using DamagedEvent )
- Deal damage to a fort_character without passing a instigator
- With the function the DamagedEvent is subscribed to, get the Instigator fort_character using “fort_character[DamageResult.Instigator?]” (Where the damage_result is named “DamageResult” in the function)
- Use any kind of method to verify that it is indeed the same fort_character as the one who was the DamageResult.Target
Expected Result
As the Fortnite.Digest.Verse states the “Instigator” should be false since the damage was instigated by code
Observed Result
The “Instigator” is the same as the “Target” despite never mentioning that.
Platform(s)
windows
Island Code
6242-6918-1114
Additional Notes
Video showing the bug: https://youtu.be/bhUQHV7OmEA
In the video the way I called the damage event from verse was by when a player dealt damage for verse to by itself do 5 damage, And then using some Hud Message Devices to show the 3 first damaged events
Verse Code used in the video:
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Fortnite.com/FortPlayerUtilities }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Fortnite.com/Game }
using { /Fortnite.com/Characters }
# See https://dev.epicgames.com/documentation/en-us/uefn/create-your-own-device-in-verse for how to create a verse device.
game_manager := class(creative_device):
StM<localizes>(TargetAgent:agent,DamageDealtByAgent:agent,Amount:float):message="'{DamageDealtByAgent}' dealt to '{TargetAgent}' {Amount} damage"
var MaxTimesFuncCanRun : int = 0
@editable ElimLog : []hud_message_device = array{}
OnBegin<override>()<suspends>:void=
Players := GetPlayspace().GetPlayers()
for(Player:Players): # Registers Everyone to the HandlePlayerHit Function
if(FC:=Player.GetFortCharacter[]):
FC.DamagedEvent().Subscribe(HandlePlayerHit)
HandlePlayerHit(DamageResult : damage_result) : void =
Target := DamageResult.Target
Amount := DamageResult.Amount
set MaxTimesFuncCanRun += 1 # Used to prevent Infinite loops of the charactar damaging themselves.
if(HUDMSG:=ElimLog[MaxTimesFuncCanRun-1],TargetAgent:=fort_character[Target].GetAgent[],DamageDealtByAgent:=fort_character[DamageResult.Instigator?].GetAgent[]):
HUDMSG.Show(StM(TargetAgent,DamageDealtByAgent,Amount)) # A log that will show in-game in order the Damaged Events Who was Damaged, how much and by who
if (DamagedCharacter := fort_character[Target],MaxTimesFuncCanRun<=3): # This will make the character who was damaged to get slightly more damage
DamagedCharacter.Damage(5.0)