# fort\_character.SetShield() DOES NOT Clamp the Shield State to \`MaxShield\`

**URL:** <https://forums.unrealengine.com/t/fort-character-setshield-does-not-clamp-the-shield-state-to-maxshield/2270113>\
**Category:** Issues and Bug Reporting\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, bug-report, fortnite\
**Created:** [January 10, 2025, 7:35pm UTC](https://forums.unrealengine.com/t/fort-character-setshield-does-not-clamp-the-shield-state-to-maxshield/2270113 "2025-01-10T19:35:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mineblo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mineblo/32/1203575_2.png) [@Mineblo](https://forums.unrealengine.com/u/Mineblo)\
**Post date:** [January 10, 2025, 7:35pm UTC](https://forums.unrealengine.com/t/fort-character-setshield-does-not-clamp-the-shield-state-to-maxshield/2270113/1 "2025-01-10T19:35:29Z")

</div>

### Summary

When a players Shield is set using the fort\_character.SetShield() despite the digest ([Verse API reference page for the SetShield function | Fortnite Documentation | Epic Developer Community](https://dev.epicgames.com/documentation/en-us/uefn/verse-api/fortnitedotcom/game/shieldable/setshield)) saying that it will clamp it between 0 and MaxShield, it does not seem to be fully the case.

Despite showing as clamped to the MaxShield when calling GetShield or By seeing the shield in the fortnite UI it seems to still be higher than the max shield

### Please select what you are reporting on:

Verse

### What Type of Bug are you experiencing?

Verse

### Steps to Reproduce

1. Create a verse device that sets the shield using the .SetShield(999.0) on a fort\_character and connect it to a button or trigger
2. Place something that damages the player, could be something like a trap or a damage volume
3. Start the game, press the button or trigger that would set your shield and take damage
4. Notice that the shield will “tank” more damage than its supposed to and go in the negatives

### Expected Result

.SetShield() should as the digest say properly clamp the value down to the maxshield

### Observed Result

.SetShield() does not properly clamp the shield down to the maxshield value

### Platform(s)

windows

### Upload an image

 ![Screenshot 2025-01-10 212854.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/b/d/abdb9c07434cba26128e880c19dd438ef292f6f9.png)

### Video

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/1/2/21267286052a84b2eb156b13ccad736b484aed5f.jpeg ".SetShield() bug") ](https://www.youtube.com/watch?v=4Gb06mYK9aI)

### Additional Notes

The Verse Script that I have used in the video:

```auto
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Fortnite.com/Characters }

health_setter := class(creative_device):

    @editable SetHPTrigger : trigger_device = trigger_device{}
    @editable CheckHPTrigger : trigger_device = trigger_device{}
    OnBegin<override>()<suspends>:void=
        SetHPTrigger.TriggeredEvent.Subscribe(OnTriggered)
        CheckHPTrigger.TriggeredEvent.Subscribe(CheckHP)
        
    OnTriggered(MaybeAgent:?agent):void=
        if(Agent:=MaybeAgent?,FortChar:=Agent.GetFortCharacter[]):
            Print("YOUR MAX SHIELD IS: {FortChar.GetMaxShield()}")
            FortChar.SetShield(400.0)
            Print("YOUR MAX SHIELD AFTER SET IS: {FortChar.GetMaxShield()}")
            Print("YOUR CURRENT SHIELD AFTER SET IS: {FortChar.GetShield()}")
            
    CheckHP(MaybeAgent:?agent):void=
        if(Agent:=MaybeAgent?,FortChar:=Agent.GetFortCharacter[]):
            Print("YOUR MAX SHIELD IS: {FortChar.GetMaxShield()}")
            Print("YOUR CURRENT SHIELD IS: {FortChar.GetShield()}")

```

---

<div class="post-metadata">

**Author:** ![Mineblo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mineblo/32/1203575_2.png) [@Mineblo](https://forums.unrealengine.com/u/Mineblo)\
**Post date:** [January 10, 2025, 7:36pm UTC](https://forums.unrealengine.com/t/fort-character-setshield-does-not-clamp-the-shield-state-to-maxshield/2270113/2 "2025-01-10T19:36:21Z")

</div>

Project files of the project shown in the video:  
[ProjectFiles.zip](https://forums.unrealengine.com/uploads/short-url/uysHdRdn8oEQWh0pFt0miCgKtYH.zip) (3.5 MB)

---

<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:** [July 9, 2025, 7:36pm UTC](https://forums.unrealengine.com/t/fort-character-setshield-does-not-clamp-the-shield-state-to-maxshield/2270113/3 "2025-07-09T19:36:23Z")

</div>

This topic was automatically closed after 180 days. New replies are no longer allowed.
