How would I set up a life count for a player?

using blueprints i am not sure how to use the math function.

Make a variable Health or Life, and set that variable by subtracting by damage on some event in which you like life to be reduced, like this:

In my example damage is static 1, but you can deliver something else, UE also go som damage system, bu not sure ho it works as i didn’t play with it

I cant see your example

He is demonstrating using Get Integer, Integer - Integer and Set Integer nodes to minus 1 from Life every time an event is triggered.

You can copy this text and then right-click in the event graph of a Blueprint to recreate it:

Begin Object Class=K2Node_VariableGet Name="K2Node_VariableGet_103"
   Begin Object Class=EdGraphPin Name="EdGraphPin_4098"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4097"
   End Object
   Begin Object Name="EdGraphPin_4098"
      PinName="self"
      PinType=(PinCategory="object",PinSubCategory="self")
      bHidden=True
   End Object
   Begin Object Name="EdGraphPin_4097"
      PinName="Life"
      Direction=EGPD_Output
      PinType=(PinCategory="int")
      DefaultValue="0"
      AutogeneratedDefaultValue="0"
      LinkedTo(0)=EdGraphPin'"K2Node_CallFunction_10004.EdGraphPin_4100"'
   End Object
   VariableReference=(MemberName="Life",bSelfContext=True)
   Pins(0)=EdGraphPin'EdGraphPin_4097'
   Pins(1)=EdGraphPin'EdGraphPin_4098'
   NodePosX=368
   NodePosY=16
   NodeGuid=AC6C208746BFBD473D44D8A361429A2F
End Object
Begin Object Class=K2Node_CallFunction Name="K2Node_CallFunction_10004"
   Begin Object Class=EdGraphPin Name="EdGraphPin_4099"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4100"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4101"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4102"
   End Object
   Begin Object Name="EdGraphPin_4099"
      PinName="self"
      PinFriendlyName="Target"
      PinToolTip="object'KismetMathLibrary' Target\n"
      PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.KismetMathLibrary')
      DefaultObject=Default__KismetMathLibrary
      bHidden=True
   End Object
   Begin Object Name="EdGraphPin_4100"
      PinName="A"
      PinToolTip="int A\n"
      PinType=(PinCategory="int")
      DefaultValue="0"
      AutogeneratedDefaultValue="0"
      LinkedTo(0)=EdGraphPin'"K2Node_VariableGet_103.EdGraphPin_4097"'
   End Object
   Begin Object Name="EdGraphPin_4101"
      PinName="B"
      PinToolTip="int B\n"
      PinType=(PinCategory="int")
      DefaultValue="1"
      AutogeneratedDefaultValue="0"
   End Object
   Begin Object Name="EdGraphPin_4102"
      PinName="ReturnValue"
      PinToolTip="int Return Value\n"
      Direction=EGPD_Output
      PinType=(PinCategory="int")
      DefaultValue="0"
      AutogeneratedDefaultValue="0"
      LinkedTo(0)=EdGraphPin'"K2Node_VariableSet_75.EdGraphPin_4105"'
   End Object
   bIsPureFunc=True
   FunctionReference=(MemberParentClass=Class'/Script/Engine.KismetMathLibrary',MemberName="Subtract_IntInt")
   Pins(0)=EdGraphPin'EdGraphPin_4099'
   Pins(1)=EdGraphPin'EdGraphPin_4100'
   Pins(2)=EdGraphPin'EdGraphPin_4101'
   Pins(3)=EdGraphPin'EdGraphPin_4102'
   NodePosX=560
   NodeGuid=127AB91C4130AF22F9EA9D8F2FF294D2
End Object
Begin Object Class=K2Node_VariableSet Name="K2Node_VariableSet_75"
   Begin Object Class=EdGraphPin Name="EdGraphPin_4103"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4104"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4105"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4106"
   End Object
   Begin Object Name="EdGraphPin_4103"
      PinName="execute"
      PinType=(PinCategory="exec")
      LinkedTo(0)=EdGraphPin'"K2Node_Event_96.EdGraphPin_4108"'
   End Object
   Begin Object Name="EdGraphPin_4104"
      PinName="then"
      Direction=EGPD_Output
      PinType=(PinCategory="exec")
   End Object
   Begin Object Name="EdGraphPin_4105"
      PinName="Life"
      PinType=(PinCategory="int")
      DefaultValue="0"
      AutogeneratedDefaultValue="0"
      LinkedTo(0)=EdGraphPin'"K2Node_CallFunction_10004.EdGraphPin_4102"'
   End Object
   Begin Object Name="EdGraphPin_4106"
      PinName="self"
      PinType=(PinCategory="object",PinSubCategory="self")
      bHidden=True
   End Object
   VariableReference=(MemberName="Life",bSelfContext=True)
   Pins(0)=EdGraphPin'EdGraphPin_4103'
   Pins(1)=EdGraphPin'EdGraphPin_4104'
   Pins(2)=EdGraphPin'EdGraphPin_4105'
   Pins(3)=EdGraphPin'EdGraphPin_4106'
   NodePosX=720
   NodePosY=-112
   NodeGuid=7A146CC447E95FD25AFB289C83752415
End Object
Begin Object Class=K2Node_Event Name="K2Node_Event_96"
   Begin Object Class=EdGraphPin Name="EdGraphPin_4107"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4108"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4109"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_4110"
   End Object
   Begin Object Name="EdGraphPin_4107"
      PinName="OutputDelegate"
      Direction=EGPD_Output
      PinType=(PinCategory="delegate",PinSubCategoryObject=Function'/Script/Engine.BTDecorator_BlueprintBase:ReceiveTick')
   End Object
   Begin Object Name="EdGraphPin_4108"
      PinName="then"
      Direction=EGPD_Output
      PinType=(PinCategory="exec")
      LinkedTo(0)=EdGraphPin'"K2Node_VariableSet_75.EdGraphPin_4103"'
   End Object
   Begin Object Name="EdGraphPin_4109"
      PinName="OwnerActor"
      Direction=EGPD_Output
      PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.Actor')
   End Object
   Begin Object Name="EdGraphPin_4110"
      PinName="DeltaSeconds"
      Direction=EGPD_Output
      PinType=(PinCategory="float")
   End Object
   EventSignatureName="ReceiveTick"
   EventSignatureClass=Class'/Script/Engine.BTDecorator_BlueprintBase'
   bOverrideFunction=True
   Pins(0)=EdGraphPin'EdGraphPin_4107'
   Pins(1)=EdGraphPin'EdGraphPin_4108'
   Pins(2)=EdGraphPin'EdGraphPin_4109'
   Pins(3)=EdGraphPin'EdGraphPin_4110'
   NodePosX=496
   NodePosY=-144
   NodeGuid=BCA082DD4AFECACB8E72FBA87E35DE6E
End Object