# How to make a health and shield changer and after elimination player, hp is been saved!

**URL:** <https://forums.unrealengine.com/t/how-to-make-a-health-and-shield-changer-and-after-elimination-player-hp-is-been-saved/2369907>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, UEFN, question, fortnite\
**Created:** [March 2, 2025, 6:44pm UTC](https://forums.unrealengine.com/t/how-to-make-a-health-and-shield-changer-and-after-elimination-player-hp-is-been-saved/2369907 "2025-03-02T18:44:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![FedorOrehshek](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FedorOrehshek](https://forums.unrealengine.com/u/FedorOrehshek)\
**Post date:** [March 2, 2025, 6:44pm UTC](https://forums.unrealengine.com/t/how-to-make-a-health-and-shield-changer-and-after-elimination-player-hp-is-been-saved/2369907/1 "2025-03-02T18:44:24Z")

</div>

Hello. Please help me. I want to do hp changer (triggers which change health and shield) on programming language Verse. I want he change hp for all players on my map and after player elimination hp’s been is saved. Thank you in advance!

---

<div class="post-metadata">

**Author:** ![BRGJuanCruzMK](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/brgjuancruzmk/32/1036548_2.png) [@BRGJuanCruzMK](https://forums.unrealengine.com/u/BRGJuanCruzMK)\
**Post date:** [March 7, 2025, 4:24pm UTC](https://forums.unrealengine.com/t/how-to-make-a-health-and-shield-changer-and-after-elimination-player-hp-is-been-saved/2369907/2 "2025-03-07T16:24:35Z")

</div>

Hello FedorOrehshek! I will try to help you with this!

First of all, don’t forget to add “using { /Fortnite.com/Characters }” in your device. This will allow you to use some character functions.

Then, you will need to set the Max Health and Max Shield for the player that activates the trigger using SetMaxHealth and SetMaxShield functions on the FortniteCharacter. To do that you will need to use a code similar to this:

```
#Variables to set the values
@editable
MoreHP : float = 50.0
@editable
MoreShield : float = 50.0
@editable
Trigger : trigger_device = trigger_device{}

OnBegin<override>()<suspends>:void=

    Trigger.TriggeredEvent.Subscribe(OnTrigger) #Subscribe to Trigger and call the corresponding function

#Function to trigger the HP and Shield change
OnTrigger (MaybeAgent:?agent) : void = #Check if the agent exists
    if (Agent := MaybeAgent?): #Get the agent that interacts with the trigger
        if (Player := Agent.GetFortCharacter[]): #Get the actual Fortnite Character and set it as Player
            CurrentHP := Player.GetMaxHealth() #Create local variable for current HP
            CurrentShield := Player.GetMaxShield() #Create local variable for current Shield
            Player.SetMaxHealth(CurrentHP + MoreHP) #Change player's HP based on CurrentHP
            Player.SetMaxShield(CurrentShield + MoreShield) #Change player's Shield based on CurrentShield

```

Additionaly you should save the new values after increasing it, so you can assign those values again after a playe respawns. That’s because when a player dies, their stats are reset to the ones defined on the Island Settings.

Hope it helps you!

---

<div class="post-metadata">

**Author:** ![FedorOrehshek](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FedorOrehshek](https://forums.unrealengine.com/u/FedorOrehshek)\
**Post date:** [March 12, 2025, 1:08pm UTC](https://forums.unrealengine.com/t/how-to-make-a-health-and-shield-changer-and-after-elimination-player-hp-is-been-saved/2369907/3 "2025-03-12T13:08:32Z")

</div>

> [@BRGJuanCruzMK](#):
>
> Additionaly you should save the new values after increasing it, so you can assign those values again after a playe respawns. That’s because when a player dies, their stats are reset to the ones defined on the Island Settings.

How to save new values?

---

<div class="post-metadata">

**Author:** ![BRGJuanCruzMK](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/brgjuancruzmk/32/1036548_2.png) [@BRGJuanCruzMK](https://forums.unrealengine.com/u/BRGJuanCruzMK)\
**Post date:** [March 14, 2025, 2:38pm UTC](https://forums.unrealengine.com/t/how-to-make-a-health-and-shield-changer-and-after-elimination-player-hp-is-been-saved/2369907/4 "2025-03-14T14:38:04Z")

</div>

Hey FedorOrehshek! It’s a pleasure!

To store those values I recommend to use Maps. [Here](https://dev.epicgames.com/documentation/en-us/uefn/map-in-verse) you can se the documentation.

You will probably need to create 2 different Maps, one for the HP and another for the Shield.

Each time a player picks up a buff, you save their current HP/Shield on the corresponding Map and when they respawn you assign the values from the Map to the player using the functions mentioned on my previous answer.

---

<div class="post-metadata">

**Author:** ![FedorOrehshek](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FedorOrehshek](https://forums.unrealengine.com/u/FedorOrehshek)\
**Post date:** [March 14, 2025, 2:43pm UTC](https://forums.unrealengine.com/t/how-to-make-a-health-and-shield-changer-and-after-elimination-player-hp-is-been-saved/2369907/5 "2025-03-14T14:43:54Z")

</div>

Thank you!

---

<div class="post-metadata">

**Author:** ![FedorOrehshek](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FedorOrehshek](https://forums.unrealengine.com/u/FedorOrehshek)\
**Post date:** [March 20, 2025, 8:11pm UTC](https://forums.unrealengine.com/t/how-to-make-a-health-and-shield-changer-and-after-elimination-player-hp-is-been-saved/2369907/6 "2025-03-20T20:11:28Z")

</div>

Hello. Can you please help and show me exactly how to do this?

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [April 19, 2025, 8:12pm UTC](https://forums.unrealengine.com/t/how-to-make-a-health-and-shield-changer-and-after-elimination-player-hp-is-been-saved/2369907/7 "2025-04-19T20:12:19Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
