Camera Shake with box Trigger with code

1. Create box trigger.

2. Create camera shake blue print. Search for it. Name it myShake

3. Adjust the values you want.

4. Create box trigger. 

5.Select the Trigger 

6.  Go into level blue print.

7. Select collision overlap Begin and end. 

8. Search for  Play World Camera Shake/ 

9. Shake. Select my Shake. 
outer 500. 

10. Select the your character in the Level and  search  for Add Get Actor Location.

11. Connect To Epicenter. See Picture

12. Play Level. 

Code--------------------------------------------------------------Below

Begin Object Class=K2Node_CallFunction Name="K2Node_CallFunction_2488"
   Begin Object Class=EdGraphPin Name="EdGraphPin_22079"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_22078"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_22077"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_22076"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_22075"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_22074"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_22073"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_22072"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_22071"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_22070"
   End Object
   Begin Object Name="EdGraphPin_22079"
      PinName="bOrientShakeTowardsEpicenter"
      PinToolTip="Orient Shake Towards Epicenter\nBoolean\n\nChanges the rotation of shake to point towards epicenter instead of forward"
      PinType=(PinCategory="bool")
      DefaultValue="false"
      AutogeneratedDefaultValue="false"
   End Object
   Begin Object Name="EdGraphPin_22078"
      PinName="Falloff"
      PinToolTip="Falloff\nFloat\n\nAffects falloff of effect as it nears OuterRadius"
      PinType=(PinCategory="float")
      DefaultValue="1.000000"
      AutogeneratedDefaultValue="1.000000"
   End Object
   Begin Object Name="EdGraphPin_22077"
      PinName="OuterRadius"
      PinToolTip="Outer Radius\nFloat\n\nCameras outside of InnerRadius and inside this are effected"
      PinType=(PinCategory="float")
      DefaultValue="500"
      AutogeneratedDefaultValue="0.0"
   End Object
   Begin Object Name="EdGraphPin_22076"
      PinName="InnerRadius"
      PinToolTip="Inner Radius\nFloat\n\nCameras inside this radius are ignored"
      PinType=(PinCategory="float")
      DefaultValue="0.0"
      AutogeneratedDefaultValue="0.0"
   End Object
   Begin Object Name="EdGraphPin_22075"
      PinName="Epicenter"
      PinToolTip="Epicenter\nVector \n\nlocation to place the effect in world space"
      PinType=(PinCategory="struct",PinSubCategoryObject=ScriptStruct'/Script/CoreUObject.Vector')
      DefaultValue="0, 0, 0"
      AutogeneratedDefaultValue="0, 0, 0"
      LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2712.EdGraphPin_24272'
   End Object
   Begin Object Name="EdGraphPin_22074"
      PinName="Shake"
      PinToolTip="Shake\nCamera Shake Class\n\nCamera shake asset to use"
      PinType=(PinCategory="class",PinSubCategoryObject=Class'/Script/Engine.CameraShake')
      DefaultObject=BlueprintGeneratedClass'/Game/Knut_BluePrints/MyShake.MyShake_C'
   End Object
   Begin Object Name="EdGraphPin_22073"
      PinName="WorldContextObject"
      PinToolTip="World Context Object\nObject Reference\n\nObject that we can obtain a world context from"
      PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/CoreUObject.Object')
      bHidden=True
   End Object
   Begin Object Name="EdGraphPin_22072"
      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_22071"
      PinName="then"
      Direction=EGPD_Output
      PinType=(PinCategory="exec")
   End Object
   Begin Object Name="EdGraphPin_22070"
      PinName="execute"
      PinType=(PinCategory="exec")
      LinkedTo(0)=EdGraphPin'K2Node_ActorBoundEvent_217.EdGraphPin_24068'
      LinkedTo(1)=EdGraphPin'K2Node_ActorBoundEvent_221.EdGraphPin_24117'
   End Object
   FunctionReference=(MemberParent=Class'/Script/Engine.GameplayStatics',MemberName="PlayWorldCameraShake")
   Pins(0)=EdGraphPin'EdGraphPin_22070'
   Pins(1)=EdGraphPin'EdGraphPin_22071'
   Pins(2)=EdGraphPin'EdGraphPin_22072'
   Pins(3)=EdGraphPin'EdGraphPin_22073'
   Pins(4)=EdGraphPin'EdGraphPin_22074'
   Pins(5)=EdGraphPin'EdGraphPin_22075'
   Pins(6)=EdGraphPin'EdGraphPin_22076'
   Pins(7)=EdGraphPin'EdGraphPin_22077'
   Pins(8)=EdGraphPin'EdGraphPin_22078'
   Pins(9)=EdGraphPin'EdGraphPin_22079'
   NodePosX=-112
   NodePosY=656
   NodeGuid=FBC344514BEB47F4C4AF1F9BE104E328
End Object
Begin Object Class=K2Node_ActorBoundEvent Name="K2Node_ActorBoundEvent_217"
   Begin Object Class=EdGraphPin Name="EdGraphPin_24069"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_24068"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_24067"
   End Object
   Begin Object Name="EdGraphPin_24069"
      PinName="OtherActor"
      PinToolTip="Other Actor\nActor Reference"
      Direction=EGPD_Output
      PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.Actor')
   End Object
   Begin Object Name="EdGraphPin_24068"
      PinName="then"
      Direction=EGPD_Output
      PinType=(PinCategory="exec")
      LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2488.EdGraphPin_22070'
   End Object
   Begin Object Name="EdGraphPin_24067"
      PinName="OutputDelegate"
      Direction=EGPD_Output
      PinType=(PinCategory="delegate",PinSubCategoryMemberReference=(MemberParent=BlueprintGeneratedClass'/Game/ThirdPersonBP/Maps/ThirdPersonExampleMap.ThirdPersonExampleMap_C',MemberName="BndEvt__TriggerBox2_3_K2Node_ActorBoundEvent_217_ActorBeginOverlapSignature__DelegateSignature"))
   End Object
   DelegatePropertyName="OnActorBeginOverlap"
   DelegateOwnerClass=Class'/Script/Engine.Actor'
   EventOwner=TriggerBox'/Game/ThirdPersonBP/Maps/ThirdPersonExampleMap.ThirdPersonExampleMap:PersistentLevel.TriggerBox2_3'
   EventReference=(MemberParent=Package'"/Script/Engine"',MemberName="ActorBeginOverlapSignature__DelegateSignature")
   bInternalEvent=True
   CustomFunctionName="BndEvt__TriggerBox2_3_K2Node_ActorBoundEvent_217_ActorBeginOverlapSignature__DelegateSignature"
   Pins(0)=EdGraphPin'EdGraphPin_24067'
   Pins(1)=EdGraphPin'EdGraphPin_24068'
   Pins(2)=EdGraphPin'EdGraphPin_24069'
   NodePosX=-384
   NodePosY=656
   NodeGuid=92C1A0DE41C570CB94664CB827DBA404
End Object
Begin Object Class=K2Node_ActorBoundEvent Name="K2Node_ActorBoundEvent_221"
   Begin Object Class=EdGraphPin Name="EdGraphPin_24118"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_24117"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_24116"
   End Object
   Begin Object Name="EdGraphPin_24118"
      PinName="OtherActor"
      PinToolTip="Other Actor\nActor Reference"
      Direction=EGPD_Output
      PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.Actor')
   End Object
   Begin Object Name="EdGraphPin_24117"
      PinName="then"
      Direction=EGPD_Output
      PinType=(PinCategory="exec")
      LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2488.EdGraphPin_22070'
   End Object
   Begin Object Name="EdGraphPin_24116"
      PinName="OutputDelegate"
      Direction=EGPD_Output
      PinType=(PinCategory="delegate",PinSubCategoryMemberReference=(MemberParent=BlueprintGeneratedClass'/Game/ThirdPersonBP/Maps/ThirdPersonExampleMap.ThirdPersonExampleMap_C',MemberName="BndEvt__TriggerBox2_3_K2Node_ActorBoundEvent_221_ActorEndOverlapSignature__DelegateSignature"))
   End Object
   DelegatePropertyName="OnActorEndOverlap"
   DelegateOwnerClass=Class'/Script/Engine.Actor'
   EventOwner=TriggerBox'/Game/ThirdPersonBP/Maps/ThirdPersonExampleMap.ThirdPersonExampleMap:PersistentLevel.TriggerBox2_3'
   EventReference=(MemberParent=Package'"/Script/Engine"',MemberName="ActorEndOverlapSignature__DelegateSignature")
   bInternalEvent=True
   CustomFunctionName="BndEvt__TriggerBox2_3_K2Node_ActorBoundEvent_221_ActorEndOverlapSignature__DelegateSignature"
   Pins(0)=EdGraphPin'EdGraphPin_24116'
   Pins(1)=EdGraphPin'EdGraphPin_24117'
   Pins(2)=EdGraphPin'EdGraphPin_24118'
   NodePosX=-384
   NodePosY=768
   NodeGuid=2A6FDB3A44C49204EB6B5CBC9D2BB6A7
End Object
Begin Object Class=K2Node_CallFunction Name="K2Node_CallFunction_2712"
   Begin Object Class=EdGraphPin Name="EdGraphPin_24272"
   End Object
   Begin Object Class=EdGraphPin Name="EdGraphPin_24271"
   End Object
   Begin Object Name="EdGraphPin_24272"
      PinName="ReturnValue"
      PinToolTip="Return Value\nVector "
      Direction=EGPD_Output
      PinType=(PinCategory="struct",PinSubCategoryObject=ScriptStruct'/Script/CoreUObject.Vector')
      AutogeneratedDefaultValue="0, 0, 0"
      LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2488.EdGraphPin_22075'
   End Object
   Begin Object Name="EdGraphPin_24271"
      PinName="self"
      PinFriendlyName="Target"
      PinToolTip="Target\nActor Reference"
      PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.Actor')
      LinkedTo(0)=EdGraphPin'K2Node_Literal_194.EdGraphPin_24274'
   End Object
   bIsPureFunc=True
   bIsConstFunc=True
   FunctionReference=(MemberName="K2_GetActorLocation",bSelfContext=True)
   Pins(0)=EdGraphPin'EdGraphPin_24271'
   Pins(1)=EdGraphPin'EdGraphPin_24272'
   NodePosX=-128
   NodePosY=928
   NodeGuid=AD4353AA4D626E8233B5B58A4BE02151
End Object
Begin Object Class=K2Node_Literal Name="K2Node_Literal_194"
   Begin Object Class=EdGraphPin Name="EdGraphPin_24274"
   End Object
   Begin Object Name="EdGraphPin_24274"
      PinName="ThirdPersonCharacter"
      PinFriendlyName="ThirdPersonCharacter"
      Direction=EGPD_Output
      PinType=(PinCategory="object",PinSubCategoryObject=BlueprintGeneratedClass'/Game/ThirdPersonBP/Blueprints/ThirdPersonCharacter.ThirdPersonCharacter_C')
      LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2712.EdGraphPin_24271'
   End Object
   ObjectRef=ThirdPersonCharacter_C'/Game/ThirdPersonBP/Maps/ThirdPersonExampleMap.ThirdPersonExampleMap:PersistentLevel.ThirdPersonCharacter_C_1'
   Pins(0)=EdGraphPin'EdGraphPin_24274'
   NodePosX=-96
   NodePosY=1008
   NodeGuid=E29F115D4B4AA400DFEDAFB3B4FAC4E1
End Object
Begin Object Class=EdGraphNode_Comment Name="EdGraphNode_Comment_112"
   NodePosX=-432
   NodePosY=608
   NodeWidth=609
   NodeHeight=490
   NodeComment="Camera Shake with box Trigger"
   NodeGuid=53CFD3C042F5FEC97BC2819265FC1EF7
End Object










Share on Google Plus

About knut

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment

0 comments:

Post a Comment