damage_result check source and amplify damage

I have a OnPlayerDamaged function listening to every fortcharacters spawn.

FortCharacter.DamagedEvent().Subscribe(OnPlayerDamaged)
#More code ...

OnPlayerDamaged(DamageResult : damage_result) : void=
		Amount := DamageResult.Amount
		Source := DamageResult.Source

		if (Instigator := DamageResult.Instigator?, Agent := Instigator.GetInstigatorAgent[], FortCharacterInstigator := Agent.GetFortCharacter[]):
			FortCharacterInstigator.Damage(Amount * 10)

		if (Victim := DamageResult.Target?, Agent := Victim.GetAgent[], FortCharacterVictim := Agent.GetFortCharacter[]):
			FortCharacterVictim.Damage(Amount * 10)

		if (Source = "pickaxe"):
			Print("Pickaxed!")

Ideally I want to do two things.

  1. Check if the Source was a pickaxe
  2. If step 1 is truthy, I want to scale the damage to the victims health.

I’m new to Verse and having trouble navigating all the documentation.
Any help would be appreciated, and if I’m using the forums inappropriately, a heads up would also be good!

P.S. The code above is pusedocode and definitely has an error involved. It was also experimental code for me to try to get a better understanding of how it works (I watched a youtube video about damage_result) so it may not make the best sense given what I’m trying to do.

you should try Instigator.DamageSource()

Doesn’t seem to exist from what I can see
“Unknown member DamageSource in game_action_instigator.(3506)”

then try “Instigator.GetSource[ ``]”

I think you’re on the right track. Idk if it’s possible to detect pickaxe. You might have to use conditional buttons to make sure the instigator is NOT holding their weapons, which would guarantee it was a pickaxe. Item instigator data probably will come with the rumored item device release

It doesn’t exist unfortunately. Here’s a look into the class.
I’m trying to use “Source” but I’m unfortunately running into a problem which is that I have no clue what is contained in there. I also can’t print out the data because there is no toString conversion from the game_action_causer to a string representation.

Screenshot Attached.

What would the implementation of that look like?
Do I need to have conditional buttons to check for all weapons that are available and check to make sure they all return false? That could work. However what do you mean “conditional button”? Is that an object I can find in the Content Browser of UEFN?

that wont work. many have tried but failed. you should use “InstigatorSource:damage_rersult = Pickaxe”

Just watch the amount of damage done and the distance from the target, easiest way to do it imo

Do you happen to have a code snippet I could borrow that checks distance within the damage_result context?

You can subscribe to the fort_character.DamagedEvent and check the distance using the Distance() method and the fort_character.GetTransform() method :+1:

Sorry Im late to this, but yes conditional button is a device. It has a IsHoldingItem function that returns false if player is not holding the device’s item