How can I add an interaction that rescales the object size while in the game? I want to be able to change an object’s size by pressing different keys; for example, if I press A, the object would increase his size in axis X and Y, and if I press D, the size would decrease. I haven’t found any reference or tutorial on how to do this. Thanks in advance!
I guess this depends on whether or not your object has a blueprint, if it does:
First, set up inputs: Go into Edit -> Project Settings -> Input, now click the + sign next to Action Mappings, then set the name of the mapping to whatever you want, and set the key to A. Now go into your blueprint and go into the event graph. Now right click, and search the name of your action mapping, and drag the action mapping’s execution pin to a ‘Set Actor Scale 3D’, and then type in the new scale.
If your object does not have a blueprint, you’ll need to get a reference to the object that you want to scale, you can do this by line tracing in front of the camera, and then just resizing the object that you are looking at using the ‘Hit Actor’ reference.
Hi! Thanks a lot for your help! The object it’s a cylinder brush, but I guess I could use another type of object like a static mesh or something else if it’s necessary. I was able to create the input buttons and find the “Set Actor Scale 3D” node in the player’s blueprint, but from there, I don’t know how to connect this node to the object I want to modify. I don’t quite understand how to do the reference to the object, do you have any suggestions for tutorials or pages on this topic?
I was also wondering if it was possible to make the input button always increase the size of the object by X amount, instead of changing it to a specific size, like the Set Actor Scale node does. Sorry if these questions have a really obvious answer, I just started with UE4 a few weeks ago, but I really apreciate the help. Thanks again!
Since seeing it work is better than a long explanation, copy and paste this into your mesh’s BP
Begin Object Class=K2Node_Event Name="K2Node_Event_196"
Begin Object Class=EdGraphPin Name="EdGraphPin_8394"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_8395"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_8396"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_2493"
End Object
Begin Object Name="EdGraphPin_8394"
PinName="OutputDelegate"
Direction=EGPD_Output
PinType=(PinCategory="delegate",PinSubCategoryMemberReference=(MemberParent=Class'/Script/Engine.Actor',MemberName="ReceiveTick"))
End Object
Begin Object Name="EdGraphPin_8395"
PinName="then"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_ExecutionSequence_54.EdGraphPin_23664'
End Object
Begin Object Name="EdGraphPin_8396"
PinName="DeltaSeconds"
PinToolTip="Delta Seconds
Float"
Direction=EGPD_Output
PinType=(PinCategory="float")
DefaultValue="0.0"
AutogeneratedDefaultValue="0.0"
End Object
Begin Object Name="EdGraphPin_2493"
PinName="OutputDelegate"
Direction=EGPD_Output
PinType=(PinCategory="delegate")
End Object
EventReference=(MemberParent=Class'/Script/Engine.Actor',MemberName="ReceiveTick")
bOverrideFunction=True
Pins(0)=EdGraphPin'EdGraphPin_8394'
Pins(1)=EdGraphPin'EdGraphPin_8395'
Pins(2)=EdGraphPin'EdGraphPin_8396'
Pins(3)=EdGraphPin'EdGraphPin_2493'
NodePosY=208
bCommentBubblePinned=True
NodeGuid=E93F6DC243FF8A8D9AB434A6CC545387
End Object
Begin Object Class=K2Node_CallFunction Name="K2Node_CallFunction_2680"
Begin Object Class=EdGraphPin Name="EdGraphPin_23119"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23118"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23117"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23116"
End Object
Begin Object Name="EdGraphPin_23119"
PinName="ReturnValue"
PinToolTip="Return Value
Player Controller Reference"
Direction=EGPD_Output
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.PlayerController')
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2681.EdGraphPin_23584'
LinkedTo(1)=EdGraphPin'K2Node_CallFunction_2682.EdGraphPin_23587'
End Object
Begin Object Name="EdGraphPin_23118"
PinName="PlayerIndex"
PinToolTip="Player Index
Integer"
PinType=(PinCategory="int")
DefaultValue="0"
AutogeneratedDefaultValue="0"
End Object
Begin Object Name="EdGraphPin_23117"
PinName="WorldContextObject"
PinToolTip="World Context Object
Object Reference"
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/CoreUObject.Object')
bHidden=True
End Object
Begin Object Name="EdGraphPin_23116"
PinName="self"
PinFriendlyName="Target"
PinToolTip="Target
Gameplay Statics Reference"
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.GameplayStatics')
DefaultObject=Default__GameplayStatics
bHidden=True
End Object
bIsPureFunc=True
FunctionReference=(MemberParent=Class'/Script/Engine.GameplayStatics',MemberName="GetPlayerController")
Pins(0)=EdGraphPin'EdGraphPin_23116'
Pins(1)=EdGraphPin'EdGraphPin_23117'
Pins(2)=EdGraphPin'EdGraphPin_23118'
Pins(3)=EdGraphPin'EdGraphPin_23119'
NodePosX=-352
NodePosY=-288
NodeGuid=16A94B614C105C10DCAF7691641EF27F
End Object
Begin Object Class=K2Node_CallFunction Name="K2Node_CallFunction_2681"
Begin Object Class=EdGraphPin Name="EdGraphPin_23586"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23585"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23584"
End Object
Begin Object Name="EdGraphPin_23586"
PinName="ReturnValue"
PinToolTip="Return Value
Boolean"
Direction=EGPD_Output
PinType=(PinCategory="bool")
AutogeneratedDefaultValue="false"
LinkedTo(0)=EdGraphPin'K2Node_IfThenElse_76.EdGraphPin_23614'
End Object
Begin Object Name="EdGraphPin_23585"
PinName="Key"
PinToolTip="Key
Key Structure"
PinType=(PinCategory="struct",PinSubCategoryObject=ScriptStruct'/Script/InputCore.Key')
DefaultValue="RightBracket"
End Object
Begin Object Name="EdGraphPin_23584"
PinName="self"
PinFriendlyName="Target"
PinToolTip="Target
Player Controller Reference"
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.PlayerController')
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2680.EdGraphPin_23119'
End Object
bIsPureFunc=True
bIsConstFunc=True
FunctionReference=(MemberParent=Class'/Script/Engine.PlayerController',MemberName="IsInputKeyDown")
Pins(0)=EdGraphPin'EdGraphPin_23584'
Pins(1)=EdGraphPin'EdGraphPin_23585'
Pins(2)=EdGraphPin'EdGraphPin_23586'
NodePosX=48
NodePosY=-192
NodeComment="Up"
bCommentBubbleVisible=True
NodeGuid=58EC76134B71BB7E49AD77B8375A182B
End Object
Begin Object Class=K2Node_CallFunction Name="K2Node_CallFunction_2682"
Begin Object Class=EdGraphPin Name="EdGraphPin_23589"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23588"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23587"
End Object
Begin Object Name="EdGraphPin_23589"
PinName="ReturnValue"
PinToolTip="Return Value
Boolean"
Direction=EGPD_Output
PinType=(PinCategory="bool")
AutogeneratedDefaultValue="false"
LinkedTo(0)=EdGraphPin'K2Node_IfThenElse_77.EdGraphPin_23653'
End Object
Begin Object Name="EdGraphPin_23588"
PinName="Key"
PinToolTip="Key
Key Structure"
PinType=(PinCategory="struct",PinSubCategoryObject=ScriptStruct'/Script/InputCore.Key')
DefaultValue="LeftBracket"
End Object
Begin Object Name="EdGraphPin_23587"
PinName="self"
PinFriendlyName="Target"
PinToolTip="Target
Player Controller Reference"
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.PlayerController')
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2680.EdGraphPin_23119'
End Object
bIsPureFunc=True
bIsConstFunc=True
FunctionReference=(MemberParent=Class'/Script/Engine.PlayerController',MemberName="IsInputKeyDown")
Pins(0)=EdGraphPin'EdGraphPin_23587'
Pins(1)=EdGraphPin'EdGraphPin_23588'
Pins(2)=EdGraphPin'EdGraphPin_23589'
NodePosY=-80
NodeComment="Down"
bCommentBubbleVisible=True
NodeGuid=06B05D4C4BB38DE6EA1D31866CA97EE1
End Object
Begin Object Class=K2Node_IfThenElse Name="K2Node_IfThenElse_76"
Begin Object Class=EdGraphPin Name="EdGraphPin_23616"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23615"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23614"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23613"
End Object
Begin Object Name="EdGraphPin_23616"
PinName="else"
PinFriendlyName="false"
Direction=EGPD_Output
PinType=(PinCategory="exec")
End Object
Begin Object Name="EdGraphPin_23615"
PinName="then"
PinFriendlyName="true"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_MacroInstance_43.EdGraphPin_23784'
End Object
Begin Object Name="EdGraphPin_23614"
PinName="Condition"
PinType=(PinCategory="bool")
DefaultValue="false"
AutogeneratedDefaultValue="false"
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2681.EdGraphPin_23586'
End Object
Begin Object Name="EdGraphPin_23613"
PinName="execute"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_ExecutionSequence_54.EdGraphPin_23665'
End Object
Pins(0)=EdGraphPin'EdGraphPin_23613'
Pins(1)=EdGraphPin'EdGraphPin_23614'
Pins(2)=EdGraphPin'EdGraphPin_23615'
Pins(3)=EdGraphPin'EdGraphPin_23616'
NodePosX=576
NodePosY=160
NodeComment="Up"
bCommentBubbleVisible=True
NodeGuid=9CCAB9D446734DA09A4AA18061C48FA5
End Object
Begin Object Class=K2Node_IfThenElse Name="K2Node_IfThenElse_77"
Begin Object Class=EdGraphPin Name="EdGraphPin_23655"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23654"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23653"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23652"
End Object
Begin Object Name="EdGraphPin_23655"
PinName="else"
PinFriendlyName="false"
Direction=EGPD_Output
PinType=(PinCategory="exec")
End Object
Begin Object Name="EdGraphPin_23654"
PinName="then"
PinFriendlyName="true"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_MacroInstance_44.EdGraphPin_23816'
End Object
Begin Object Name="EdGraphPin_23653"
PinName="Condition"
PinType=(PinCategory="bool")
DefaultValue="false"
AutogeneratedDefaultValue="false"
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2682.EdGraphPin_23589'
End Object
Begin Object Name="EdGraphPin_23652"
PinName="execute"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_ExecutionSequence_54.EdGraphPin_23666'
End Object
Pins(0)=EdGraphPin'EdGraphPin_23652'
Pins(1)=EdGraphPin'EdGraphPin_23653'
Pins(2)=EdGraphPin'EdGraphPin_23654'
Pins(3)=EdGraphPin'EdGraphPin_23655'
NodePosX=576
NodePosY=288
NodeComment="Down"
bCommentBubbleVisible=True
NodeGuid=450908ED477D17BDF0D6A59BCBE04649
End Object
Begin Object Class=K2Node_ExecutionSequence Name="K2Node_ExecutionSequence_54"
Begin Object Class=EdGraphPin Name="EdGraphPin_23666"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23665"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23664"
End Object
Begin Object Name="EdGraphPin_23666"
PinName="then_1"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_IfThenElse_77.EdGraphPin_23652'
End Object
Begin Object Name="EdGraphPin_23665"
PinName="then_0"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_IfThenElse_76.EdGraphPin_23613'
End Object
Begin Object Name="EdGraphPin_23664"
PinName="execute"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_Event_196.EdGraphPin_8395'
End Object
Pins(0)=EdGraphPin'EdGraphPin_23664'
Pins(1)=EdGraphPin'EdGraphPin_23665'
Pins(2)=EdGraphPin'EdGraphPin_23666'
NodePosX=128
NodePosY=208
NodeGuid=8F5D80B94A4623792AAD70A929F2FBFD
End Object
Begin Object Class=K2Node_CallFunction Name="K2Node_CallFunction_2683"
Begin Object Class=EdGraphPin Name="EdGraphPin_23670"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23669"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23668"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23667"
End Object
Begin Object Name="EdGraphPin_23670"
PinName="NewScale"
PinToolTip="New Scale
Vector "
PinType=(PinCategory="struct",PinSubCategoryObject=ScriptStruct'/Script/CoreUObject.Vector')
DefaultValue="0, 0, 0"
AutogeneratedDefaultValue="0, 0, 0"
LinkedTo(0)=EdGraphPin'K2Node_CommutativeAssociativeBinaryOperator_62.EdGraphPin_23684'
End Object
Begin Object Name="EdGraphPin_23669"
PinName="self"
PinFriendlyName="Target"
PinToolTip="Target
Scene Component Reference"
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.SceneComponent')
LinkedTo(0)=EdGraphPin'K2Node_VariableGet_229.EdGraphPin_23671'
End Object
Begin Object Name="EdGraphPin_23668"
PinName="then"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_ExecutionSequence_55.EdGraphPin_23860'
End Object
Begin Object Name="EdGraphPin_23667"
PinName="execute"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_MacroInstance_43.EdGraphPin_23789'
End Object
FunctionReference=(MemberParent=Class'/Script/Engine.SceneComponent',MemberName="SetWorldScale3D")
Pins(0)=EdGraphPin'EdGraphPin_23667'
Pins(1)=EdGraphPin'EdGraphPin_23668'
Pins(2)=EdGraphPin'EdGraphPin_23669'
Pins(3)=EdGraphPin'EdGraphPin_23670'
NodePosX=1728
NodePosY=-112
NodeGuid=1DFECD0E4F9B06A006720DB534D30021
End Object
Begin Object Class=K2Node_VariableGet Name="K2Node_VariableGet_229"
Begin Object Class=EdGraphPin Name="EdGraphPin_23672"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23671"
End Object
Begin Object Name="EdGraphPin_23672"
PinName="self"
PinFriendlyName="Target"
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.StaticMeshActor')
bHidden=True
End Object
Begin Object Name="EdGraphPin_23671"
PinName="StaticMeshComponent"
Direction=EGPD_Output
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.StaticMeshComponent')
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2683.EdGraphPin_23669'
End Object
VariableReference=(MemberName="StaticMeshComponent",bSelfContext=True)
Pins(0)=EdGraphPin'EdGraphPin_23671'
Pins(1)=EdGraphPin'EdGraphPin_23672'
NodePosX=1488
NodePosY=-192
NodeComment="Reference to your mesh"
bCommentBubbleVisible=True
NodeGuid=DA356191411792A6114843BF04079CBB
End Object
Begin Object Class=K2Node_CallFunction Name="K2Node_CallFunction_2684"
Begin Object Class=EdGraphPin Name="EdGraphPin_23676"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23675"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23674"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23673"
End Object
Begin Object Name="EdGraphPin_23676"
PinName="NewScale"
PinToolTip="New Scale
Vector "
PinType=(PinCategory="struct",PinSubCategoryObject=ScriptStruct'/Script/CoreUObject.Vector')
DefaultValue="0, 0, 0"
AutogeneratedDefaultValue="0, 0, 0"
LinkedTo(0)=EdGraphPin'K2Node_CommutativeAssociativeBinaryOperator_63.EdGraphPin_23694'
End Object
Begin Object Name="EdGraphPin_23675"
PinName="self"
PinFriendlyName="Target"
PinToolTip="Target
Scene Component Reference"
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.SceneComponent')
LinkedTo(0)=EdGraphPin'K2Node_VariableGet_230.EdGraphPin_23677'
End Object
Begin Object Name="EdGraphPin_23674"
PinName="then"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_ExecutionSequence_56.EdGraphPin_23867'
End Object
Begin Object Name="EdGraphPin_23673"
PinName="execute"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_MacroInstance_44.EdGraphPin_23821'
End Object
FunctionReference=(MemberParent=Class'/Script/Engine.SceneComponent',MemberName="SetWorldScale3D")
Pins(0)=EdGraphPin'EdGraphPin_23673'
Pins(1)=EdGraphPin'EdGraphPin_23674'
Pins(2)=EdGraphPin'EdGraphPin_23675'
Pins(3)=EdGraphPin'EdGraphPin_23676'
NodePosX=1728
NodePosY=512
NodeGuid=092DCBE540CB0F639078DBB3A3739DA4
End Object
Begin Object Class=K2Node_VariableGet Name="K2Node_VariableGet_230"
Begin Object Class=EdGraphPin Name="EdGraphPin_23678"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23677"
End Object
Begin Object Name="EdGraphPin_23678"
PinName="self"
PinFriendlyName="Target"
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.StaticMeshActor')
bHidden=True
End Object
Begin Object Name="EdGraphPin_23677"
PinName="StaticMeshComponent"
Direction=EGPD_Output
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.StaticMeshComponent')
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2684.EdGraphPin_23675'
End Object
VariableReference=(MemberName="StaticMeshComponent",bSelfContext=True)
Pins(0)=EdGraphPin'EdGraphPin_23677'
Pins(1)=EdGraphPin'EdGraphPin_23678'
NodePosX=1509
NodePosY=460
NodeComment="This is a reference to your mesh"
bCommentBubbleVisible=True
NodeGuid=3E7C71D6477952E56A4BEBB5EDDB9242
End Object
Begin Object Class=K2Node_CallFunction Name="K2Node_CallFunction_2685"
Begin Object Class=EdGraphPin Name="EdGraphPin_23680"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23679"
End Object
Begin Object Name="EdGraphPin_23680"
PinName="ReturnValue"
PinToolTip="Return Value
Vector "
Direction=EGPD_Output
PinType=(PinCategory="struct",PinSubCategoryObject=ScriptStruct'/Script/CoreUObject.Vector')
AutogeneratedDefaultValue="0, 0, 0"
LinkedTo(0)=EdGraphPin'K2Node_CommutativeAssociativeBinaryOperator_62.EdGraphPin_23682'
End Object
Begin Object Name="EdGraphPin_23679"
PinName="self"
PinFriendlyName="Target"
PinToolTip="Target
Actor Reference"
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.Actor')
End Object
bIsPureFunc=True
bIsConstFunc=True
FunctionReference=(MemberName="GetActorScale3D",bSelfContext=True)
Pins(0)=EdGraphPin'EdGraphPin_23679'
Pins(1)=EdGraphPin'EdGraphPin_23680'
NodePosX=1072
NodePosY=-224
NodeGuid=198AACD04BD5B197AA088CB4D9C545E2
End Object
Begin Object Class=K2Node_CommutativeAssociativeBinaryOperator Name="K2Node_CommutativeAssociativeBinaryOperator_62"
Begin Object Class=EdGraphPin Name="EdGraphPin_23684"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23683"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23682"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23681"
End Object
Begin Object Name="EdGraphPin_23684"
PinName="ReturnValue"
PinToolTip="Return Value
Vector "
Direction=EGPD_Output
PinType=(PinCategory="struct",PinSubCategoryObject=ScriptStruct'/Script/CoreUObject.Vector')
AutogeneratedDefaultValue="0, 0, 0"
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2683.EdGraphPin_23670'
End Object
Begin Object Name="EdGraphPin_23683"
PinName="B"
PinToolTip="B
Vector "
PinType=(PinCategory="struct",PinSubCategoryObject=ScriptStruct'/Script/CoreUObject.Vector')
DefaultValue="0.010000,0.010000,0.010000"
AutogeneratedDefaultValue="0, 0, 0"
End Object
Begin Object Name="EdGraphPin_23682"
PinName="A"
PinToolTip="A
Vector "
PinType=(PinCategory="struct",PinSubCategoryObject=ScriptStruct'/Script/CoreUObject.Vector')
DefaultValue="0, 0, 0"
AutogeneratedDefaultValue="0, 0, 0"
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2685.EdGraphPin_23680'
End Object
Begin Object Name="EdGraphPin_23681"
PinName="self"
PinFriendlyName="Target"
PinToolTip="Target
Kismet 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_VectorVector")
Pins(0)=EdGraphPin'EdGraphPin_23681'
Pins(1)=EdGraphPin'EdGraphPin_23682'
Pins(2)=EdGraphPin'EdGraphPin_23683'
Pins(3)=EdGraphPin'EdGraphPin_23684'
NodePosX=1360
NodePosY=-112
NodeComment="This is what you want it to scale up by"
bCommentBubbleVisible=True
NodeGuid=A4DF27C9406B52E42B7EE2B0EA8B69BC
End Object
Begin Object Class=K2Node_CallFunction Name="K2Node_CallFunction_2686"
Begin Object Class=EdGraphPin Name="EdGraphPin_23686"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23685"
End Object
Begin Object Name="EdGraphPin_23686"
PinName="ReturnValue"
PinToolTip="Return Value
Vector "
Direction=EGPD_Output
PinType=(PinCategory="struct",PinSubCategoryObject=ScriptStruct'/Script/CoreUObject.Vector')
AutogeneratedDefaultValue="0, 0, 0"
LinkedTo(0)=EdGraphPin'K2Node_CommutativeAssociativeBinaryOperator_63.EdGraphPin_23692'
End Object
Begin Object Name="EdGraphPin_23685"
PinName="self"
PinFriendlyName="Target"
PinToolTip="Target
Actor Reference"
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.Actor')
End Object
bIsPureFunc=True
bIsConstFunc=True
FunctionReference=(MemberName="GetActorScale3D",bSelfContext=True)
Pins(0)=EdGraphPin'EdGraphPin_23685'
Pins(1)=EdGraphPin'EdGraphPin_23686'
NodePosX=1104
NodePosY=624
NodeGuid=72D199C847B8DC1BADE5558E82A89FFA
End Object
Begin Object Class=K2Node_CommutativeAssociativeBinaryOperator Name="K2Node_CommutativeAssociativeBinaryOperator_63"
Begin Object Class=EdGraphPin Name="EdGraphPin_23694"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23693"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23692"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23691"
End Object
Begin Object Name="EdGraphPin_23694"
PinName="ReturnValue"
PinToolTip="Return Value
Vector "
Direction=EGPD_Output
PinType=(PinCategory="struct",PinSubCategoryObject=ScriptStruct'/Script/CoreUObject.Vector')
AutogeneratedDefaultValue="0, 0, 0"
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2684.EdGraphPin_23676'
End Object
Begin Object Name="EdGraphPin_23693"
PinName="B"
PinToolTip="B
Vector "
PinType=(PinCategory="struct",PinSubCategoryObject=ScriptStruct'/Script/CoreUObject.Vector')
DefaultValue="-0.010000,-0.010000,-0.010000"
AutogeneratedDefaultValue="0, 0, 0"
End Object
Begin Object Name="EdGraphPin_23692"
PinName="A"
PinToolTip="A
Vector "
PinType=(PinCategory="struct",PinSubCategoryObject=ScriptStruct'/Script/CoreUObject.Vector')
DefaultValue="0, 0, 0"
AutogeneratedDefaultValue="0, 0, 0"
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2686.EdGraphPin_23686'
End Object
Begin Object Name="EdGraphPin_23691"
PinName="self"
PinFriendlyName="Target"
PinToolTip="Target
Kismet 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_VectorVector")
Pins(0)=EdGraphPin'EdGraphPin_23691'
Pins(1)=EdGraphPin'EdGraphPin_23692'
Pins(2)=EdGraphPin'EdGraphPin_23693'
Pins(3)=EdGraphPin'EdGraphPin_23694'
NodePosX=1392
NodePosY=592
NodeComment="This is what you want it to scale down by"
bCommentBubbleVisible=True
NodeGuid=0594AC5E49F0AAF10E1AB894F8825E65
End Object
Begin Object Class=K2Node_MacroInstance Name="K2Node_MacroInstance_43"
Begin Object Class=EdGraphPin Name="EdGraphPin_23789"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23788"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23787"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23786"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23785"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23784"
End Object
Begin Object Name="EdGraphPin_23789"
PinName="Exit"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2683.EdGraphPin_23667'
End Object
Begin Object Name="EdGraphPin_23788"
PinName="bStartClosed"
PinType=(PinCategory="bool")
DefaultValue="false"
AutogeneratedDefaultValue="true"
End Object
Begin Object Name="EdGraphPin_23787"
PinName="Toggle"
PinType=(PinCategory="exec")
End Object
Begin Object Name="EdGraphPin_23786"
PinName="Close"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_Knot_34.EdGraphPin_23864'
End Object
Begin Object Name="EdGraphPin_23785"
PinName="Open"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_Knot_35.EdGraphPin_23866'
End Object
Begin Object Name="EdGraphPin_23784"
PinName="Enter"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_IfThenElse_76.EdGraphPin_23615'
End Object
MacroGraphReference=(MacroGraph=EdGraph'/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:Gate',GraphBlueprint=Blueprint'/Engine/EditorBlueprintResources/StandardMacros.StandardMacros',GraphGuid=5FD0ADDB41B99E726A411F8E87B5F37C)
Pins(0)=EdGraphPin'EdGraphPin_23784'
Pins(1)=EdGraphPin'EdGraphPin_23785'
Pins(2)=EdGraphPin'EdGraphPin_23786'
Pins(3)=EdGraphPin'EdGraphPin_23787'
Pins(4)=EdGraphPin'EdGraphPin_23788'
Pins(5)=EdGraphPin'EdGraphPin_23789'
NodePosX=960
NodePosY=80
NodeComment="Limits scaling speed (optional)"
bCommentBubbleVisible=True
NodeGuid=0E3D5FE747D47BFC108A2DBC912A9EC3
End Object
Begin Object Class=K2Node_MacroInstance Name="K2Node_MacroInstance_44"
Begin Object Class=EdGraphPin Name="EdGraphPin_23821"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23820"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23819"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23818"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23817"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23816"
End Object
Begin Object Name="EdGraphPin_23821"
PinName="Exit"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2684.EdGraphPin_23673'
End Object
Begin Object Name="EdGraphPin_23820"
PinName="bStartClosed"
PinType=(PinCategory="bool")
DefaultValue="false"
AutogeneratedDefaultValue="true"
End Object
Begin Object Name="EdGraphPin_23819"
PinName="Toggle"
PinType=(PinCategory="exec")
End Object
Begin Object Name="EdGraphPin_23818"
PinName="Close"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_Knot_36.EdGraphPin_23871'
End Object
Begin Object Name="EdGraphPin_23817"
PinName="Open"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_Knot_37.EdGraphPin_23873'
End Object
Begin Object Name="EdGraphPin_23816"
PinName="Enter"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_IfThenElse_77.EdGraphPin_23654'
End Object
MacroGraphReference=(MacroGraph=EdGraph'/Engine/EditorBlueprintResources/StandardMacros.StandardMacros:Gate',GraphBlueprint=Blueprint'/Engine/EditorBlueprintResources/StandardMacros.StandardMacros',GraphGuid=5FD0ADDB41B99E726A411F8E87B5F37C)
Pins(0)=EdGraphPin'EdGraphPin_23816'
Pins(1)=EdGraphPin'EdGraphPin_23817'
Pins(2)=EdGraphPin'EdGraphPin_23818'
Pins(3)=EdGraphPin'EdGraphPin_23819'
Pins(4)=EdGraphPin'EdGraphPin_23820'
Pins(5)=EdGraphPin'EdGraphPin_23821'
NodePosX=960
NodePosY=368
NodeComment="Limits scaling speed (Optional)"
bCommentBubbleVisible=True
NodeGuid=93C124E14D20A5B96D583A94D656C686
End Object
Begin Object Class=K2Node_CallFunction Name="K2Node_CallFunction_2687"
Begin Object Class=EdGraphPin Name="EdGraphPin_23853"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23852"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23851"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23850"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23849"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23848"
End Object
Begin Object Name="EdGraphPin_23853"
PinName="LatentInfo"
PinToolTip="Latent Info
Latent Action Info Structure
The latent action."
PinType=(PinCategory="struct",PinSubCategoryObject=ScriptStruct'/Script/Engine.LatentActionInfo')
bHidden=True
End Object
Begin Object Name="EdGraphPin_23852"
PinName="Duration"
PinToolTip="Duration
Float
length of delay (in seconds)."
PinType=(PinCategory="float")
DefaultValue=".1"
AutogeneratedDefaultValue="0.2"
End Object
Begin Object Name="EdGraphPin_23851"
PinName="WorldContextObject"
PinToolTip="World Context Object
Object Reference"
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/CoreUObject.Object')
bHidden=True
End Object
Begin Object Name="EdGraphPin_23850"
PinName="self"
PinFriendlyName="Target"
PinToolTip="Target
Kismet System Library Reference"
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.KismetSystemLibrary')
DefaultObject=Default__KismetSystemLibrary
bHidden=True
End Object
Begin Object Name="EdGraphPin_23849"
PinName="then"
PinFriendlyName="Completed"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_Knot_35.EdGraphPin_23865'
End Object
Begin Object Name="EdGraphPin_23848"
PinName="execute"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_ExecutionSequence_55.EdGraphPin_23861'
End Object
FunctionReference=(MemberParent=Class'/Script/Engine.KismetSystemLibrary',MemberName="Delay")
Pins(0)=EdGraphPin'EdGraphPin_23848'
Pins(1)=EdGraphPin'EdGraphPin_23849'
Pins(2)=EdGraphPin'EdGraphPin_23850'
Pins(3)=EdGraphPin'EdGraphPin_23851'
Pins(4)=EdGraphPin'EdGraphPin_23852'
Pins(5)=EdGraphPin'EdGraphPin_23853'
NodePosX=2096
NodePosY=-96
NodeGuid=D8320A0341F168C11E1DA58A7377A373
End Object
Begin Object Class=K2Node_CallFunction Name="K2Node_CallFunction_2688"
Begin Object Class=EdGraphPin Name="EdGraphPin_23859"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23858"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23857"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23856"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23855"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23854"
End Object
Begin Object Name="EdGraphPin_23859"
PinName="LatentInfo"
PinToolTip="Latent Info
Latent Action Info Structure
The latent action."
PinType=(PinCategory="struct",PinSubCategoryObject=ScriptStruct'/Script/Engine.LatentActionInfo')
bHidden=True
End Object
Begin Object Name="EdGraphPin_23858"
PinName="Duration"
PinToolTip="Duration
Float
length of delay (in seconds)."
PinType=(PinCategory="float")
DefaultValue=".1"
AutogeneratedDefaultValue="0.2"
End Object
Begin Object Name="EdGraphPin_23857"
PinName="WorldContextObject"
PinToolTip="World Context Object
Object Reference"
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/CoreUObject.Object')
bHidden=True
End Object
Begin Object Name="EdGraphPin_23856"
PinName="self"
PinFriendlyName="Target"
PinToolTip="Target
Kismet System Library Reference"
PinType=(PinCategory="object",PinSubCategoryObject=Class'/Script/Engine.KismetSystemLibrary')
DefaultObject=Default__KismetSystemLibrary
bHidden=True
End Object
Begin Object Name="EdGraphPin_23855"
PinName="then"
PinFriendlyName="Completed"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_Knot_37.EdGraphPin_23872'
End Object
Begin Object Name="EdGraphPin_23854"
PinName="execute"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_ExecutionSequence_56.EdGraphPin_23868'
End Object
FunctionReference=(MemberParent=Class'/Script/Engine.KismetSystemLibrary',MemberName="Delay")
Pins(0)=EdGraphPin'EdGraphPin_23854'
Pins(1)=EdGraphPin'EdGraphPin_23855'
Pins(2)=EdGraphPin'EdGraphPin_23856'
Pins(3)=EdGraphPin'EdGraphPin_23857'
Pins(4)=EdGraphPin'EdGraphPin_23858'
Pins(5)=EdGraphPin'EdGraphPin_23859'
NodePosX=2128
NodePosY=528
NodeGuid=12DE388D4C56F96BC43BA0A1079F3580
End Object
Begin Object Class=K2Node_ExecutionSequence Name="K2Node_ExecutionSequence_55"
Begin Object Class=EdGraphPin Name="EdGraphPin_23862"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23861"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23860"
End Object
Begin Object Name="EdGraphPin_23862"
PinName="then_1"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_Knot_34.EdGraphPin_23863'
End Object
Begin Object Name="EdGraphPin_23861"
PinName="then_0"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2687.EdGraphPin_23848'
End Object
Begin Object Name="EdGraphPin_23860"
PinName="execute"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2683.EdGraphPin_23668'
End Object
Pins(0)=EdGraphPin'EdGraphPin_23860'
Pins(1)=EdGraphPin'EdGraphPin_23861'
Pins(2)=EdGraphPin'EdGraphPin_23862'
NodePosX=1952
NodePosY=-96
NodeGuid=988C7ED7424CE5636407528738D486DA
End Object
Begin Object Class=K2Node_Knot Name="K2Node_Knot_34"
Begin Object Class=EdGraphPin Name="EdGraphPin_23864"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23863"
End Object
Begin Object Name="EdGraphPin_23864"
PinName="OutputPin"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_MacroInstance_43.EdGraphPin_23786'
End Object
Begin Object Name="EdGraphPin_23863"
PinName="InputPin"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_ExecutionSequence_55.EdGraphPin_23862'
bDefaultValueIsIgnored=True
End Object
Pins(0)=EdGraphPin'EdGraphPin_23863'
Pins(1)=EdGraphPin'EdGraphPin_23864'
NodePosX=1392
NodePosY=352
NodeGuid=D23B4B6B42404557A815078F6A5B218C
End Object
Begin Object Class=K2Node_Knot Name="K2Node_Knot_35"
Begin Object Class=EdGraphPin Name="EdGraphPin_23866"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23865"
End Object
Begin Object Name="EdGraphPin_23866"
PinName="OutputPin"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_MacroInstance_43.EdGraphPin_23785'
End Object
Begin Object Name="EdGraphPin_23865"
PinName="InputPin"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2687.EdGraphPin_23849'
bDefaultValueIsIgnored=True
End Object
Pins(0)=EdGraphPin'EdGraphPin_23865'
Pins(1)=EdGraphPin'EdGraphPin_23866'
NodePosX=1376
NodePosY=-320
NodeGuid=CF15844D481405A7CA3AC3A2D706254F
End Object
Begin Object Class=K2Node_ExecutionSequence Name="K2Node_ExecutionSequence_56"
Begin Object Class=EdGraphPin Name="EdGraphPin_23869"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23868"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23867"
End Object
Begin Object Name="EdGraphPin_23869"
PinName="then_1"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_Knot_36.EdGraphPin_23870'
End Object
Begin Object Name="EdGraphPin_23868"
PinName="then_0"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2688.EdGraphPin_23854'
End Object
Begin Object Name="EdGraphPin_23867"
PinName="execute"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2684.EdGraphPin_23674'
End Object
Pins(0)=EdGraphPin'EdGraphPin_23867'
Pins(1)=EdGraphPin'EdGraphPin_23868'
Pins(2)=EdGraphPin'EdGraphPin_23869'
NodePosX=1968
NodePosY=528
NodeGuid=0F4CD9A24B64D51DD70F7F90043A5C2E
End Object
Begin Object Class=K2Node_Knot Name="K2Node_Knot_36"
Begin Object Class=EdGraphPin Name="EdGraphPin_23871"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23870"
End Object
Begin Object Name="EdGraphPin_23871"
PinName="OutputPin"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_MacroInstance_44.EdGraphPin_23818'
End Object
Begin Object Name="EdGraphPin_23870"
PinName="InputPin"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_ExecutionSequence_56.EdGraphPin_23869'
bDefaultValueIsIgnored=True
End Object
Pins(0)=EdGraphPin'EdGraphPin_23870'
Pins(1)=EdGraphPin'EdGraphPin_23871'
NodePosX=1392
NodePosY=352
NodeGuid=E1468C1B4E6884553F1D888382C2BDAA
End Object
Begin Object Class=K2Node_Knot Name="K2Node_Knot_37"
Begin Object Class=EdGraphPin Name="EdGraphPin_23873"
End Object
Begin Object Class=EdGraphPin Name="EdGraphPin_23872"
End Object
Begin Object Name="EdGraphPin_23873"
PinName="OutputPin"
Direction=EGPD_Output
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_MacroInstance_44.EdGraphPin_23817'
End Object
Begin Object Name="EdGraphPin_23872"
PinName="InputPin"
PinType=(PinCategory="exec")
LinkedTo(0)=EdGraphPin'K2Node_CallFunction_2688.EdGraphPin_23855'
bDefaultValueIsIgnored=True
End Object
Pins(0)=EdGraphPin'EdGraphPin_23872'
Pins(1)=EdGraphPin'EdGraphPin_23873'
NodePosX=1440
NodePosY=880
NodeGuid=8EE743D147B5827E612B5CB4B1A3AD01
End Object
You may have to replace the Static mesh references to the mesh you want to scale, and you may want to change the “is input key down” checks to the ones you want, but it should work correctly
BTW: To create a reference to an object in a blueprint, you can either drag it from the component list on the top left, or you can select it in the BP viewport and r-click on the BP, and it will list things you can call for that component.
Hi dotdog20, thank you so much for your help! Your code was a lifesaver and made it really easy to understand. I’m truly grateful