Additional Damage Per Specific Weapon
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Fortnite.com/Characters }
using { /Fortnite.com/Game }
custom_weapon_setup := class<concrete><unique>():
@editable
DamageMultiplierValue : float = 0.0
@editable
ConditionalButton : conditional_button_device = conditional_button_device {}
custom_weapon_damage := class(creative_device):
@editable
CustomWeaponSetups : []custom_weapon_setup = array{}
@editable
UseTestPlayers : logic = false
var DamageSubscriptions : [player][]?cancelable = map{}
HandlePlayerHit( DamageResult : damage_result ) : void =
if:
Target := DamageResult.Target
Amount := DamageResult.Amount
Instigator := DamageResult.Instigator?
InstigatorAgent := Instigator.GetInstigatorAgent[]
CharacterWhoWasHitFort := fort_character[Target]
then:
if (InstigatorAgent = CharacterWhoWasHitFort.GetAgent[]):
Print("Character hit self!")
else:
if(Weapon := CheckForCustomWeapon(InstigatorAgent)?):
BonusDamage := Amount * Weapon.DamageMultiplierValue
CharacterWhoWasHitFort.Damage(BonusDamage)
Print("Damage multiplier applied! Bonus {BonusDamage} Damage!")
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.