Hello, I am trying to make a map where I am using swords and guns but I want to give the sword users to have some advantage so, i want to give them more Hp and Shields and more damage if possible I have found a tutorial on how to check for item held but I dont know how to do the HP and shields and Damage and when not holding the Item it removes the added HP and damaga and put it back to default. I am really bad with verse so I need some help, here is the code I found for checking on the holding item
using { /Fortnite.com/Devices }
using { /Fortnite.com/Game }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }
using { /Verse.org/Random }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
Heal := class(creative_device):
@editable
ItemDetector:conditional_button_device = conditional_button_device{}
OnBegin<override>()<suspends>:void=
spawn:
CheckForItem()
CheckForItem()<suspends>:void=
Sleep(1.0)
AllPlayers:=GetPlayspace().GetPlayers()
for(player:AllPlayers):
if(IsAgent:agent = agent[Player]):
if(ItemDetector.IsHoldingItem[IsAgent]):
Print("Holding")
#Give Player HP and Shields
else:
Print("Not Holding")
#Remove the HP and Shields from the player