1. First import health Pack
2. The Create Blueprint Actor Class.
3. Then changes to this
4. Compile and Save
5. Then hit Component Over Lap
6. The Create this Code to get health Back (Need from Health Bar Tut to work)
Here is the Code
Begin Object Class=K2Node_ComponentBoundEvent Name="K2Node_ComponentBoundEvent_94"
Begin Object Class=EdGraphPin Name="EdGraphPin_29063"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29062"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29061"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29060"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29059"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29058"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29057"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29056"
End Object
Begin Object Name="EdGraphPin_29063"
PinName="SweepResult"
PinToolTip="Sweep Result\nHit Result Structure (by ref)"
Direction=EGPD_Output
PinType=(PinCategory="struct",PinSubCategoryObject=ScriptStruct'/Script/Engine.HitResult',bIsReference=True,bIsConst=True)
End Object
Begin Object Name="EdGraphPin_29062"
PinName="bFromSweep"
PinToolTip="From Sweep\nBoolean"
Direction=EGPD_Output
PinType=(PinCategory="bool")
DefaultValue="false"
AutogeneratedDefaultValue="false"
End Object
Begin Object Name="EdGraphPin_29061"
PinName="OtherBodyIndex"
PinToolTip="Other Body Index\nInteger"
Direction=EGPD_Output
PinType=(PinCategory="int")
DefaultValue="0"
AutogeneratedDefaultValue="0"
End Object
Begin Object Name="EdGraphPin_29060"
PinName="OtherComp"
PinToolTip="Other Comp\nPrimitive Component Reference"
Direction=EGPD_Output
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.PrimitiveComponent')
End Object
Begin Object Name="EdGraphPin_29059"
PinName="OtherActor"
PinToolTip="Other Actor\nActor Reference"
Direction=EGPD_Output
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.Actor')
LinkedTo(0)=EdGraphPin'K2Node_DynamicCast_824.EdGraphPin_29104'
End Object
Begin Object Name="EdGraphPin_29058"
PinName="then"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_DynamicCast_824.EdGraphPin_29101'
End Object
Begin Object Name="EdGraphPin_29057"
PinName="OutputDelegate"
Direction=EGPD_Output
PinType=(PinCategory="delegate")
End Object
Begin Object Name="EdGraphPin_29056"
PinName="OutputDelegate"
Direction=EGPD_Output
PinType=(PinCategory="delegate",PinSubCategoryMemberReference=(MemberParent=BlueprintGeneratedClass'/Game/Knut_3D/HealthPickUp.HealthPickUp_C',MemberName="BndEvt__HealthSkullCube_K2Node_ComponentBoundEvent_93_ComponentBeginOverlapSignature__DelegateSignature"))
End Object
DelegatePropertyName="OnComponentBeginOverlap"
DelegateOwnerClass=Class'/Script/Engine.PrimitiveComponent'
ComponentPropertyName="HealthSkullCube"
EventReference=(MemberParent=Package'"/Script/Engine"',MemberName="ComponentBeginOverlapSignature__DelegateSignature")
bInternalEvent=True
CustomFunctionName="BndEvt__HealthSkullCube_K2Node_ComponentBoundEvent_93_ComponentBeginOverlapSignature__DelegateSignature"
Pins(0)=EdGraphPin'EdGraphPin_29056'
Pins(1)=EdGraphPin'EdGraphPin_29057'
Pins(2)=EdGraphPin'EdGraphPin_29058'
Pins(3)=EdGraphPin'EdGraphPin_29059'
Pins(4)=EdGraphPin'EdGraphPin_29060'
Pins(5)=EdGraphPin'EdGraphPin_29061'
Pins(6)=EdGraphPin'EdGraphPin_29062'
Pins(7)=EdGraphPin'EdGraphPin_29063'
NodePosY=656
NodeGuid=8580793A44F971226A341B916ED33528
End Object
Begin Object Class=K2Node_DynamicCast Name="K2Node_DynamicCast_824"
Begin Object Class=EdGraphPin Name="EdGraphPin_29106"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29105"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29104"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29103"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29102"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29101"
End Object
Begin Object Name="EdGraphPin_29106"
PinName="bSuccess"
Direction=EGPD_Output
PinType=(PinCategory="bool")
bHidden=True
End Object
Begin Object Name="EdGraphPin_29105"
PinName="AsThird Person Character"
Direction=EGPD_Output
PinType=(PinCategory="object",PinSubCategoryObject=BlueprintGeneratedClass'/Game/ThirdPersonBP/Blueprints/ThirdPersonCharacter.ThirdPersonCharacter_C')
LinkedTo(0)=EdGraphPin'K2Node_VariableSet_467.EdGraphPin_29110'
LinkedTo(1)=EdGraphPin'K2Node_VariableGet_321.EdGraphPin_29117'
End Object
Begin Object Name="EdGraphPin_29104"
PinName="Object"
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/CoreUObject.Object')
LinkedTo(0)=EdGraphPin'K2Node_ComponentBoundEvent_94.EdGraphPin_29059'
End Object
Begin Object Name="EdGraphPin_29103"
PinName="CastFailed"
Direction=EGPD_Output
PinType=(PinCategory="exec")
End Object
Begin Object Name="EdGraphPin_29102"
PinName="then"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_VariableSet_467.EdGraphPin_29107'
End Object
Begin Object Name="EdGraphPin_29101"
PinName="execute"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_ComponentBoundEvent_94.EdGraphPin_29058'
End Object
TargetType=BlueprintGeneratedClass'/Game/ThirdPersonBP/Blueprints/ThirdPersonCharacter.ThirdPersonCharacter_C'
Pins(0)=EdGraphPin'EdGraphPin_29101'
Pins(1)=EdGraphPin'EdGraphPin_29102'
Pins(2)=EdGraphPin'EdGraphPin_29103'
Pins(3)=EdGraphPin'EdGraphPin_29104'
Pins(4)=EdGraphPin'EdGraphPin_29105'
Pins(5)=EdGraphPin'EdGraphPin_29106'
NodePosX=416
NodePosY=656
NodeGuid=FCD95B3848451432391CFCB23246985E
End Object
Begin Object Class=K2Node_VariableSet Name="K2Node_VariableSet_467"
Begin Object Class=EdGraphPin Name="EdGraphPin_29111"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29110"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29109"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29108"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29107"
End Object
Begin Object Name="EdGraphPin_29111"
PinName="Output_Get"
PinToolTip="Retrieves the value of the variable, can use instead of a separate Get node"
Direction=EGPD_Output
PinType=(PinCategory="float")
DefaultValue="0.0"
AutogeneratedDefaultValue="0.0"
End Object
Begin Object Name="EdGraphPin_29110"
PinName="self"
PinFriendlyName="Target"
PinType=(PinCategory="object",PinSubCategoryObject=BlueprintGeneratedClass'/Game/ThirdPersonBP/Blueprints/ThirdPersonCharacter.ThirdPersonCharacter_C')
LinkedTo(0)=EdGraphPin'K2Node_DynamicCast_824.EdGraphPin_29105'
End Object
Begin Object Name="EdGraphPin_29109"
PinName="Health"
PinType=(PinCategory="float")
DefaultValue="0.0"
AutogeneratedDefaultValue="0.0"
LinkedTo(0)=EdGraphPin'K2Node_CommutativeAssociativeBinaryOperator_90.EdGraphPin_29115'
End Object
Begin Object Name="EdGraphPin_29108"
PinName="then"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_3836.EdGraphPin_29118'
End Object
Begin Object Name="EdGraphPin_29107"
PinName="execute"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_DynamicCast_824.EdGraphPin_29102'
End Object
VariableReference=(MemberParent=BlueprintGeneratedClass'/Game/ThirdPersonBP/Blueprints/ThirdPersonCharacter.ThirdPersonCharacter_C',MemberName="Health",MemberGuid=FF2FAA7E4B34BA8B9824748B042834B4)
SelfContextInfo=NotSelfContext
Pins(0)=EdGraphPin'EdGraphPin_29107'
Pins(1)=EdGraphPin'EdGraphPin_29108'
Pins(2)=EdGraphPin'EdGraphPin_29109'
Pins(3)=EdGraphPin'EdGraphPin_29110'
Pins(4)=EdGraphPin'EdGraphPin_29111'
NodePosX=736
NodePosY=672
NodeComment="From Last Tut"
bCommentBubbleVisible=True
NodeGuid=330EC7F44EA8EE55219C579773027930
End Object
Begin Object Class=K2Node_CommutativeAssociativeBinaryOperator Name="K2Node_CommutativeAssociativeBinaryOperator_90"
Begin Object Class=EdGraphPin Name="EdGraphPin_29115"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29114"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29113"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29112"
End Object
Begin Object Name="EdGraphPin_29115"
PinName="ReturnValue"
PinToolTip="Return Value\nFloat"
Direction=EGPD_Output
PinType=(PinCategory="float")
AutogeneratedDefaultValue="0.0"
LinkedTo(0)=EdGraphPin'K2Node_VariableSet_467.EdGraphPin_29109'
End Object
Begin Object Name="EdGraphPin_29114"
PinName="B"
PinToolTip="B\nFloat"
PinType=(PinCategory="float")
DefaultValue=".25"
AutogeneratedDefaultValue="1.000000"
End Object
Begin Object Name="EdGraphPin_29113"
PinName="A"
PinToolTip="A\nFloat"
PinType=(PinCategory="float")
DefaultValue="0.0"
AutogeneratedDefaultValue="0.0"
LinkedTo(0)=EdGraphPin'K2Node_VariableGet_321.EdGraphPin_29116'
End Object
Begin Object Name="EdGraphPin_29112"
PinName="self"
PinFriendlyName="Target"
PinToolTip="Target\nKismet Math Library Reference"
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.KismetMathLibrary')
DefaultObject=Default__KismetMathLibrary
bHidden=True
End Object
bIsPureFunc=True
FunctionReference=(MemberParent=Class'/Script/Engine.KismetMathLibrary',MemberName="Add_FloatFloat")
Pins(0)=EdGraphPin'EdGraphPin_29112'
Pins(1)=EdGraphPin'EdGraphPin_29113'
Pins(2)=EdGraphPin'EdGraphPin_29114'
Pins(3)=EdGraphPin'EdGraphPin_29115'
NodePosX=608
NodePosY=864
NodeGuid=EB808B504A45628240780DA2ECD6ACAA
End Object
Begin Object Class=K2Node_VariableGet Name="K2Node_VariableGet_321"
Begin Object Class=EdGraphPin Name="EdGraphPin_29117"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29116"
End Object
Begin Object Name="EdGraphPin_29117"
PinName="self"
PinFriendlyName="Target"
PinType=(PinCategory="object",PinSubCategoryObject=BlueprintGeneratedClass'/Game/ThirdPersonBP/Blueprints/ThirdPersonCharacter.ThirdPersonCharacter_C')
LinkedTo(0)=EdGraphPin'K2Node_DynamicCast_824.EdGraphPin_29105'
End Object
Begin Object Name="EdGraphPin_29116"
PinName="Health"
Direction=EGPD_Output
PinType=(PinCategory="float")
AutogeneratedDefaultValue="0.0"
LinkedTo(0)=EdGraphPin'K2Node_CommutativeAssociativeBinaryOperator_90.EdGraphPin_29113'
End Object
VariableReference=(MemberParent=BlueprintGeneratedClass'/Game/ThirdPersonBP/Blueprints/ThirdPersonCharacter.ThirdPersonCharacter_C',MemberName="Health",MemberGuid=FF2FAA7E4B34BA8B9824748B042834B4)
SelfContextInfo=NotSelfContext
Pins(0)=EdGraphPin'EdGraphPin_29116'
Pins(1)=EdGraphPin'EdGraphPin_29117'
NodePosX=384
NodePosY=864
NodeGuid=0FF8CD5E4E3D7F0EA9B16EAB85AD71E0
End Object
Begin Object Class=K2Node_CallFunction Name="K2Node_CallFunction_3836"
Begin Object Class=EdGraphPin Name="EdGraphPin_29127"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29126"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29125"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29124"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29123"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29122"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29121"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29120"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29119"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29118"
End Object
Begin Object Name="EdGraphPin_29127"
PinName="AttenuationSettings"
PinToolTip="Attenuation Settings\nSound Attenuation Reference\n\nOverride attenuation settings package to play sound with"
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.SoundAttenuation')
bAdvancedView=True
End Object
Begin Object Name="EdGraphPin_29126"
PinName="StartTime"
PinToolTip="Start Time\nFloat"
PinType=(PinCategory="float")
DefaultValue="0.000000"
AutogeneratedDefaultValue="0.000000"
bAdvancedView=True
End Object
Begin Object Name="EdGraphPin_29125"
PinName="PitchMultiplier"
PinToolTip="Pitch Multiplier\nFloat\n\nPitchMultiplier"
PinType=(PinCategory="float")
DefaultValue="1.000000"
AutogeneratedDefaultValue="1.000000"
bAdvancedView=True
End Object
Begin Object Name="EdGraphPin_29124"
PinName="VolumeMultiplier"
PinToolTip="Volume Multiplier\nFloat\n\nVolume multiplier"
PinType=(PinCategory="float")
DefaultValue="1.000000"
AutogeneratedDefaultValue="1.000000"
bAdvancedView=True
End Object
Begin Object Name="EdGraphPin_29123"
PinName="Location"
PinToolTip="Location\nVector \n\nWorld position to play sound at"
PinType=(PinCategory="struct",PinSubCategoryObject=ScriptStruct'/Script/CoreUObject.Vector')
DefaultValue="0, 0, 0"
AutogeneratedDefaultValue="0, 0, 0"
End Object
Begin Object Name="EdGraphPin_29122"
PinName="Sound"
PinToolTip="Sound\nSound Base Reference\n\nsound to play"
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.SoundBase')
DefaultObject=SoundWave'/Game/Knut_3D/Yeah.Yeah'
End Object
Begin Object Name="EdGraphPin_29121"
PinName="WorldContextObject"
PinToolTip="World Context Object\nObject Reference"
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/CoreUObject.Object')
bHidden=True
End Object
Begin Object Name="EdGraphPin_29120"
PinName="self"
PinFriendlyName="Target"
PinToolTip="Target\nGameplay Statics Reference"
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.GameplayStatics')
DefaultObject=Default__GameplayStatics
bHidden=True
End Object
Begin Object Name="EdGraphPin_29119"
PinName="then"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_3837.EdGraphPin_29128'
End Object
Begin Object Name="EdGraphPin_29118"
PinName="execute"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_VariableSet_467.EdGraphPin_29108'
End Object
FunctionReference=(MemberParent=Class'/Script/Engine.GameplayStatics',MemberName="PlaySoundAtLocation")
Pins(0)=EdGraphPin'EdGraphPin_29118'
Pins(1)=EdGraphPin'EdGraphPin_29119'
Pins(2)=EdGraphPin'EdGraphPin_29120'
Pins(3)=EdGraphPin'EdGraphPin_29121'
Pins(4)=EdGraphPin'EdGraphPin_29122'
Pins(5)=EdGraphPin'EdGraphPin_29123'
Pins(6)=EdGraphPin'EdGraphPin_29124'
Pins(7)=EdGraphPin'EdGraphPin_29125'
Pins(8)=EdGraphPin'EdGraphPin_29126'
Pins(9)=EdGraphPin'EdGraphPin_29127'
NodePosX=992
NodePosY=624
NodeGuid=58A47C1F44FE540A120EDCB352FA1195
AdvancedPinDisplay=Hidden
End Object
Begin Object Class=K2Node_CallFunction Name="K2Node_CallFunction_3837"
Begin Object Class=EdGraphPin Name="EdGraphPin_29130"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29129"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29128"
End Object
Begin Object Name="EdGraphPin_29130"
PinName="self"
PinFriendlyName="Target"
PinToolTip="Target\nActor Reference"
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.Actor')
End Object
Begin Object Name="EdGraphPin_29129"
PinName="then"
Direction=EGPD_Output
PinType=(PinCategory="exec")
End Object
Begin Object Name="EdGraphPin_29128"
PinName="execute"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_3836.EdGraphPin_29119'
End Object
FunctionReference=(MemberName="K2_DestroyActor",bSelfContext=True)
Pins(0)=EdGraphPin'EdGraphPin_29128'
Pins(1)=EdGraphPin'EdGraphPin_29129'
Pins(2)=EdGraphPin'EdGraphPin_29130'
NodePosX=1280
NodePosY=656
NodeGuid=CA6623994FC7DD986EEF0E9D04993F9B
End Object
If you want the Health Pack to Spin Around 360 degree.
1. In Tick add Add actor local Rotation
Code:
Begin Object Class=K2Node_Event Name="K2Node_Event_394"
Begin Object Class=EdGraphPin Name="EdGraphPin_28957"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_28956"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_28955"
End Object
Begin Object Name="EdGraphPin_28957"
PinName="DeltaSeconds"
PinToolTip="Delta Seconds\nFloat"
Direction=EGPD_Output
PinType=(PinCategory="float")
DefaultValue="0.0"
AutogeneratedDefaultValue="0.0"
End Object
Begin Object Name="EdGraphPin_28956"
PinName="then"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_3895.EdGraphPin_29400'
End Object
Begin Object Name="EdGraphPin_28955"
PinName="OutputDelegate"
Direction=EGPD_Output
PinType=(PinCategory="delegate",PinSubCategoryMemberReference=(MemberParent=Class'/Script/Engine.Actor',MemberName="ReceiveTick"))
End Object
EventReference=(MemberParent=Class'/Script/Engine.Actor',MemberName="ReceiveTick")
bOverrideFunction=True
Pins(0)=EdGraphPin'EdGraphPin_28955'
Pins(1)=EdGraphPin'EdGraphPin_28956'
Pins(2)=EdGraphPin'EdGraphPin_28957'
NodePosX=32
NodePosY=288
bCommentBubblePinned=True
NodeGuid=F21930D64B555E740B29E0844E1A225D
End Object
Begin Object Class=K2Node_CallFunction Name="K2Node_CallFunction_3895"
Begin Object Class=EdGraphPin Name="EdGraphPin_29405"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29404"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29403"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29402"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29401"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_29400"
End Object
Begin Object Name="EdGraphPin_29405"
PinName="SweepHitResult"
PinToolTip="Sweep Hit Result\nHit Result Structure"
Direction=EGPD_Output
PinType=(PinCategory="struct",PinSubCategoryObject=ScriptStruct'/Script/Engine.HitResult')
bAdvancedView=True
End Object
Begin Object Name="EdGraphPin_29404"
PinName="bSweep"
PinToolTip="Sweep\nBoolean"
PinType=(PinCategory="bool")
DefaultValue="false"
AutogeneratedDefaultValue="false"
bAdvancedView=True
End Object
Begin Object Name="EdGraphPin_29403"
PinName="DeltaRotation"
PinToolTip="Delta Rotation\nRotator "
PinType=(PinCategory="struct",PinSubCategoryObject=ScriptStruct'/Script/CoreUObject.Rotator')
DefaultValue="0,2.000000, 0"
AutogeneratedDefaultValue="0, 0, 0"
End Object
Begin Object Name="EdGraphPin_29402"
PinName="self"
PinFriendlyName="Target"
PinToolTip="Target\nActor Reference"
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.Actor')
End Object
Begin Object Name="EdGraphPin_29401"
PinName="then"
Direction=EGPD_Output
PinType=(PinCategory="exec")
End Object
Begin Object Name="EdGraphPin_29400"
PinName="execute"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_Event_394.EdGraphPin_28956'
End Object
FunctionReference=(MemberName="K2_AddActorLocalRotation",bSelfContext=True)
Pins(0)=EdGraphPin'EdGraphPin_29400'
Pins(1)=EdGraphPin'EdGraphPin_29401'
Pins(2)=EdGraphPin'EdGraphPin_29402'
Pins(3)=EdGraphPin'EdGraphPin_29403'
Pins(4)=EdGraphPin'EdGraphPin_29404'
Pins(5)=EdGraphPin'EdGraphPin_29405'
NodePosX=256
NodePosY=272
NodeGuid=CD9135D146EE07730FE88BB4AB678772
AdvancedPinDisplay=Hidden
End Object
0 comments:
Post a Comment