fort_character.SetShield is not working as expected in a published project.
Curiously it’s working when I use ‘Launch Session’ in UEFN. The following code applies 25 shield in a launched session, but 75 shield in a published project.
What can I do?
using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Fortnite.com/Playspaces }
using { /Verse.org/Simulation }
using { /Verse.org/Verse }
add_shield_test := class(creative_device):
AddShield(InPlayer : agent) : void =
if (myFortCharacter : fort_character = InPlayer.GetFortCharacter[]):
var _shield : float = myFortCharacter.GetShield()
set _shield = _shield + 25.0
myFortCharacter.SetShield(_shield)
Print("Set shield to {_shield}")