How to do a simple for loop and print out strings

All I want is to loop over the indices of my for loop and print them out to the screen with a delay of 0.5 seconds between each iteration. I added the following nodes to the event graph of my level blueprint. Yet the only thing it prints out is “Iteration: 11”, so it seems like it runs through the indices of the array without a delay and only prints the last one, which isn’t even the last index I specified. How do I fix this?

The nodes:

The result:

Loops don’t work well with delay. It breaks the look. You need to make your own macro with a delay built in.

Code to paste into editor

BPGraph(GraphName="ForLoopDelay",GraphType=GT_Macro,OriginalBlueprint=Blueprint'"/Game/Target.Target"',NodesString="Begin Object Class=/Script/BlueprintGraph.K2Node_Tunnel Name=\"K2Node_Tunnel_0\"\r\n   bCanHaveOutputs=True\r\n   MetaData=()\r\n   NodePosX=-64\r\n   NodePosY=80\r\n   NodeGuid=8AA0ABB04CB2540758D8D1935BC8E152\r\n   CustomProperties Pin (PinId=BB440EB34044D2106CCA30A8CC3118A4,PinName=\"execute\",Direction=\"EGPD_Output\",PinType.PinCategory=\"exec\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_AssignmentStatement_3 DD9ED5AE40CBEAA471A1CF87B92B7BA4,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=DED57EA24D0647947BC3BEA2FBABCAA0,PinName=\"First Index\",Direction=\"EGPD_Output\",PinType.PinCategory=\"int\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_AssignmentStatement_3 34329E2047B24948EC2F2786F8811892,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=27040A9A4370FB7AC5387E815FDC386C,PinName=\"Last Index\",Direction=\"EGPD_Output\",PinType.PinCategory=\"int\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_CallFunction_454 430979A24A82D5B76ABDB2A3FDE041C3,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=DF424B624D584A4860CA4BBA43FA2FF8,PinName=\"DelayTime\",Direction=\"EGPD_Output\",PinType.PinCategory=\"real\",PinType.PinSubCategory=\"float\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue=\"0.200000\",AutogeneratedDefaultValue=\"0.200000\",LinkedTo=(K2Node_CallFunction_0 D42D0B21407A91B24DA89F9CC5A6158A,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties UserDefinedPin (PinName=\"execute\",PinType=(PinCategory=\"exec\"),DesiredPinDirection=EGPD_Output)\r\n   CustomProperties UserDefinedPin (PinName=\"First Index\",PinType=(PinCategory=\"int\"),DesiredPinDirection=EGPD_Output)\r\n   CustomProperties UserDefinedPin (PinName=\"Last Index\",PinType=(PinCategory=\"int\"),DesiredPinDirection=EGPD_Output)\r\n   CustomProperties UserDefinedPin (PinName=\"DelayTime\",PinType=(PinCategory=\"real\",PinSubCategory=\"float\"),DesiredPinDirection=EGPD_Output,PinDefaultValue=\"0.200000\")\r\nEnd Object\r\nBegin Object Class=/Script/BlueprintGraph.K2Node_Tunnel Name=\"K2Node_Tunnel_1\"\r\n   bCanHaveInputs=True\r\n   NodePosX=1232\r\n   NodePosY=64\r\n   NodeGuid=8B35207344A2FDF30616C3B0E43FE6C7\r\n   CustomProperties Pin (PinId=AD5EBBF446615D24F26DD486FCB1E2EA,PinName=\"LoopBody\",PinType.PinCategory=\"exec\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_ExecutionSequence_8 232D8FC34046EE98A97A269D5A977AA1,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=F46F0DDA4D77CB75AAC94090B05E470E,PinName=\"Index\",PinType.PinCategory=\"int\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_TemporaryVariable_4 93E0E3C343791F30C973CF81B1E30EC5,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=B6E2851C4F0A3DEB73B964A97D9F5102,PinName=\"Completed\",PinType.PinCategory=\"exec\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_IfThenElse_7 4918789F462740F33D455581A85DE1C6,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties UserDefinedPin (PinName=\"LoopBody\",PinType=(PinCategory=\"exec\"),DesiredPinDirection=EGPD_Input)\r\n   CustomProperties UserDefinedPin (PinName=\"Index\",PinType=(PinCategory=\"int\"),DesiredPinDirection=EGPD_Input)\r\n   CustomProperties UserDefinedPin (PinName=\"Completed\",PinType=(PinCategory=\"exec\"),DesiredPinDirection=EGPD_Input)\r\nEnd Object\r\nBegin Object Class=/Script/BlueprintGraph.K2Node_TemporaryVariable Name=\"K2Node_TemporaryVariable_4\"\r\n   VariableType=(PinCategory=\"int\")\r\n   NodePosX=-64\r\n   NodePosY=240\r\n   NodeGuid=9F9856414E04950B3D248BB1129942DA\r\n   CustomProperties Pin (PinId=93E0E3C343791F30C973CF81B1E30EC5,PinName=\"Variable\",Direction=\"EGPD_Output\",PinType.PinCategory=\"int\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_AssignmentStatement_3 68D59A7445E4A800E47F7293EFFE86F7,K2Node_CallFunction_563 F30D0F834728268991B7E59FD54A0966,K2Node_AssignmentStatement_7 DB65C90C4F5928219553848F9C2D955B,K2Node_CallFunction_454 40E62C6449734190106C29B84C94A416,K2Node_Tunnel_1 F46F0DDA4D77CB75AAC94090B05E470E,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\nEnd Object\r\nBegin Object Class=/Script/BlueprintGraph.K2Node_AssignmentStatement Name=\"K2Node_AssignmentStatement_3\"\r\n   NodePosX=144\r\n   NodePosY=48\r\n   NodeGuid=805901A248BF85D30D8485B48F4E27D1\r\n   CustomProperties Pin (PinId=DD9ED5AE40CBEAA471A1CF87B92B7BA4,PinName=\"execute\",PinType.PinCategory=\"exec\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_Tunnel_0 BB440EB34044D2106CCA30A8CC3118A4,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=8CF0A623484D25D500F85EADB3BC1335,PinName=\"then\",Direction=\"EGPD_Output\",PinType.PinCategory=\"exec\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_IfThenElse_7 F9A71B4A42BAD523227B2CAD7451622B,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=68D59A7445E4A800E47F7293EFFE86F7,PinName=\"Variable\",PinType.PinCategory=\"int\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_TemporaryVariable_4 93E0E3C343791F30C973CF81B1E30EC5,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=34329E2047B24948EC2F2786F8811892,PinName=\"Value\",PinType.PinCategory=\"int\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_Tunnel_0 DED57EA24D0647947BC3BEA2FBABCAA0,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\nEnd Object\r\nBegin Object Class=/Script/BlueprintGraph.K2Node_CallFunction Name=\"K2Node_CallFunction_454\"\r\n   bIsPureFunc=True\r\n   FunctionReference=(MemberParent=Class\'\"/Script/Engine.KismetMathLibrary\"\',MemberName=\"LessEqual_IntInt\")\r\n   NodePosX=192\r\n   NodePosY=240\r\n   NodeGuid=399E98614DE0DC6F832643AC27AE3F5F\r\n   CustomProperties Pin (PinId=B558FDE040B6F2F69AB362849D29BFB0,PinName=\"self\",PinFriendlyName=NSLOCTEXT(\"K2Node\", \"Target\", \"Target\"),PinToolTip=\"Target\\nKismet Math Library Object Reference\",PinType.PinCategory=\"object\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=Class\'\"/Script/Engine.KismetMathLibrary\"\',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultObject=\"/Script/Engine.Default__KismetMathLibrary\",PersistentGuid=00000000000000000000000000000000,bHidden=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=40E62C6449734190106C29B84C94A416,PinName=\"A\",PinToolTip=\"A\\nInteger\",PinType.PinCategory=\"int\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue=\"0\",AutogeneratedDefaultValue=\"0\",LinkedTo=(K2Node_TemporaryVariable_4 93E0E3C343791F30C973CF81B1E30EC5,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=430979A24A82D5B76ABDB2A3FDE041C3,PinName=\"B\",PinToolTip=\"B\\nInteger\",PinType.PinCategory=\"int\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue=\"0\",AutogeneratedDefaultValue=\"0\",LinkedTo=(K2Node_Tunnel_0 27040A9A4370FB7AC5387E815FDC386C,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=53F28AD64869D157CDE123B8B514ECF3,PinName=\"ReturnValue\",PinToolTip=\"Return Value\\nBoolean\\n\\nReturns true if A is less than or equal to B (A <= B)\",Direction=\"EGPD_Output\",PinType.PinCategory=\"bool\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue=\"false\",AutogeneratedDefaultValue=\"false\",LinkedTo=(K2Node_IfThenElse_7 6363E92B4DD522DBC3025CAA45FC9A33,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\nEnd Object\r\nBegin Object Class=/Script/BlueprintGraph.K2Node_CallFunction Name=\"K2Node_CallFunction_563\"\r\n   bIsPureFunc=True\r\n   FunctionReference=(MemberParent=Class\'\"/Script/Engine.KismetMathLibrary\"\',MemberName=\"Add_IntInt\")\r\n   NodePosX=176\r\n   NodePosY=496\r\n   NodeGuid=72CC8CD8494D42D0C8ABA0986763ED06\r\n   CustomProperties Pin (PinId=D2E90E0A41F966C937E12386DA56BC5B,PinName=\"self\",PinFriendlyName=NSLOCTEXT(\"K2Node\", \"Target\", \"Target\"),PinToolTip=\"Target\\nKismet Math Library Object Reference\",PinType.PinCategory=\"object\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=Class\'\"/Script/Engine.KismetMathLibrary\"\',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultObject=\"/Script/Engine.Default__KismetMathLibrary\",PersistentGuid=00000000000000000000000000000000,bHidden=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=F30D0F834728268991B7E59FD54A0966,PinName=\"A\",PinToolTip=\"A\\nInteger\",PinType.PinCategory=\"int\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue=\"0\",AutogeneratedDefaultValue=\"0\",LinkedTo=(K2Node_TemporaryVariable_4 93E0E3C343791F30C973CF81B1E30EC5,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=0DA3CF5D4BCA91F6ED5C429724F7BECC,PinName=\"B\",PinToolTip=\"B\\nInteger\",PinType.PinCategory=\"int\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue=\"1\",AutogeneratedDefaultValue=\"1\",PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=4F06EB6D4CD4CFEB215D80BDF8DCDCE2,PinName=\"ReturnValue\",PinToolTip=\"Return Value\\nInteger\\n\\nAddition (A + B)\",Direction=\"EGPD_Output\",PinType.PinCategory=\"int\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue=\"0\",AutogeneratedDefaultValue=\"0\",LinkedTo=(K2Node_AssignmentStatement_7 A3C05B504EF4C1F6B35BD28AFD168E2F,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\nEnd Object\r\nBegin Object Class=/Script/BlueprintGraph.K2Node_AssignmentStatement Name=\"K2Node_AssignmentStatement_7\"\r\n   NodePosX=752\r\n   NodePosY=432\r\n   NodeGuid=D3791CD64DD5B21680A8A6B064C5805F\r\n   CustomProperties Pin (PinId=71FEB9654E14F949BADAB5A44A9E1EBA,PinName=\"execute\",PinType.PinCategory=\"exec\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_ExecutionSequence_8 9A1AD1764FE4007C1C09C2AADCFDEAE0,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=6B2672AC40AF9DD518697E89D7E45E48,PinName=\"then\",Direction=\"EGPD_Output\",PinType.PinCategory=\"exec\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_CallFunction_0 FA11BBB64DA2B4D571BA5BBE59605677,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=DB65C90C4F5928219553848F9C2D955B,PinName=\"Variable\",PinType.PinCategory=\"int\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_TemporaryVariable_4 93E0E3C343791F30C973CF81B1E30EC5,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=A3C05B504EF4C1F6B35BD28AFD168E2F,PinName=\"Value\",PinType.PinCategory=\"int\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_CallFunction_563 4F06EB6D4CD4CFEB215D80BDF8DCDCE2,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\nEnd Object\r\nBegin Object Class=/Script/BlueprintGraph.K2Node_IfThenElse Name=\"K2Node_IfThenElse_7\"\r\n   NodePosX=432\r\n   NodePosY=64\r\n   NodeGuid=BF09DD5A49DF268FB3D43C9EEC92B4EF\r\n   CustomProperties Pin (PinId=F9A71B4A42BAD523227B2CAD7451622B,PinName=\"execute\",PinType.PinCategory=\"exec\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_AssignmentStatement_3 8CF0A623484D25D500F85EADB3BC1335,K2Node_CallFunction_0 F36B759F47BD3F7A8C139BBF3523F0AD,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=6363E92B4DD522DBC3025CAA45FC9A33,PinName=\"Condition\",PinType.PinCategory=\"bool\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue=\"true\",AutogeneratedDefaultValue=\"true\",LinkedTo=(K2Node_CallFunction_454 53F28AD64869D157CDE123B8B514ECF3,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=45F3A57141A72E6DBCBEEB90FEE70A27,PinName=\"then\",PinFriendlyName=NSLOCTEXT(\"K2Node\", \"true\", \"true\"),Direction=\"EGPD_Output\",PinType.PinCategory=\"exec\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_ExecutionSequence_8 D7DF609842731194A0169AB60828FF60,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=4918789F462740F33D455581A85DE1C6,PinName=\"else\",PinFriendlyName=NSLOCTEXT(\"K2Node\", \"false\", \"false\"),Direction=\"EGPD_Output\",PinType.PinCategory=\"exec\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_Tunnel_1 B6E2851C4F0A3DEB73B964A97D9F5102,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\nEnd Object\r\nBegin Object Class=/Script/BlueprintGraph.K2Node_ExecutionSequence Name=\"K2Node_ExecutionSequence_8\"\r\n   NodePosX=752\r\n   NodePosY=64\r\n   NodeGuid=5C5866664B10638F2A694883C6A78611\r\n   CustomProperties Pin (PinId=D7DF609842731194A0169AB60828FF60,PinName=\"execute\",PinType.PinCategory=\"exec\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_IfThenElse_7 45F3A57141A72E6DBCBEEB90FEE70A27,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=232D8FC34046EE98A97A269D5A977AA1,PinName=\"then_0\",Direction=\"EGPD_Output\",PinType.PinCategory=\"exec\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_Tunnel_1 AD5EBBF446615D24F26DD486FCB1E2EA,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=9A1AD1764FE4007C1C09C2AADCFDEAE0,PinName=\"then_1\",Direction=\"EGPD_Output\",PinType.PinCategory=\"exec\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_AssignmentStatement_7 71FEB9654E14F949BADAB5A44A9E1EBA,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\nEnd Object\r\nBegin Object Class=/Script/BlueprintGraph.K2Node_CallFunction Name=\"K2Node_CallFunction_0\"\r\n   FunctionReference=(MemberParent=Class\'\"/Script/Engine.KismetSystemLibrary\"\',MemberName=\"Delay\")\r\n   NodePosX=944\r\n   NodePosY=416\r\n   NodeGuid=BDEB40F44B52D234697302B7A528D64B\r\n   CustomProperties Pin (PinId=FA11BBB64DA2B4D571BA5BBE59605677,PinName=\"execute\",PinToolTip=\"\\nExec\",PinType.PinCategory=\"exec\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_AssignmentStatement_7 6B2672AC40AF9DD518697E89D7E45E48,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=F36B759F47BD3F7A8C139BBF3523F0AD,PinName=\"then\",PinFriendlyName=NSLOCTEXT(\"\", \"35EA7A974C44E34AB6DDB9AC1C0FB60F\", \"Completed\"),PinToolTip=\"Completed\\nExec\",Direction=\"EGPD_Output\",PinType.PinCategory=\"exec\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,LinkedTo=(K2Node_IfThenElse_7 F9A71B4A42BAD523227B2CAD7451622B,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=188E2A8C4C44AC4DB81959ADE781099A,PinName=\"self\",PinFriendlyName=NSLOCTEXT(\"K2Node\", \"Target\", \"Target\"),PinToolTip=\"Target\\nKismet System Library Object Reference\",PinType.PinCategory=\"object\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=Class\'\"/Script/Engine.KismetSystemLibrary\"\',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultObject=\"/Script/Engine.Default__KismetSystemLibrary\",PersistentGuid=00000000000000000000000000000000,bHidden=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=4D0E60254FA190EE43E2089EB51BDC9F,PinName=\"WorldContextObject\",PinToolTip=\"World Context Object\\nObject Reference\",PinType.PinCategory=\"object\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=Class\'\"/Script/CoreUObject.Object\"\',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=True,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,PersistentGuid=00000000000000000000000000000000,bHidden=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=D42D0B21407A91B24DA89F9CC5A6158A,PinName=\"Duration\",PinToolTip=\"Duration\\nFloat (single-precision)\\n\\nlength of delay (in seconds).\",PinType.PinCategory=\"real\",PinType.PinSubCategory=\"float\",PinType.PinSubCategoryObject=None,PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue=\"0.2\",AutogeneratedDefaultValue=\"0.2\",LinkedTo=(K2Node_Tunnel_0 DF424B624D584A4860CA4BBA43FA2FF8,),PersistentGuid=00000000000000000000000000000000,bHidden=False,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\n   CustomProperties Pin (PinId=E9DF3A174ECBD3CBD6405DAF5E60DA1D,PinName=\"LatentInfo\",PinToolTip=\"Latent Info\\nLatent Action Info Structure\\n\\nThe latent action.\",PinType.PinCategory=\"struct\",PinType.PinSubCategory=\"\",PinType.PinSubCategoryObject=ScriptStruct\'\"/Script/Engine.LatentActionInfo\"\',PinType.PinSubCategoryMemberReference=(),PinType.PinValueType=(),PinType.ContainerType=None,PinType.bIsReference=False,PinType.bIsConst=False,PinType.bIsWeakPointer=False,PinType.bIsUObjectWrapper=False,PinType.bSerializeAsSinglePrecisionFloat=False,DefaultValue=\"(Linkage=-1,UUID=-1,ExecutionFunction=\\\"\\\",CallbackTarget=None)\",AutogeneratedDefaultValue=\"LatentInfo\",PersistentGuid=00000000000000000000000000000000,bHidden=True,bNotConnectable=False,bDefaultValueIsReadOnly=False,bDefaultValueIsIgnored=False,bAdvancedView=False,bOrphanedPin=False,)\r\nEnd Object\r\n")

1 Like

As 3dRaven said Delay node breaks For Loop if placed in loop’s body. I have tried with Timer function but it does not work as well. For a workaround You can use DoN node and following code:

It is a little more complicated then For Loop but it works. Hope it helps.

2 Likes

You can also do this with a Timer. You’ll need a var to represent the Last Index queried though.

There’s more than one good answer in this thread so Idk which one to choose as the answer. I’m just going to default to choosing the one that is the simplest/most straightforward, which is yours.

Thank you to 3dRaven for the time invested into making my idea work in practice, however this is a bit much for my current level and I don’t even know what “pasting the code into the editor” is supposed to mean and how I am supposed to utilise this solution.
What editor? Is this some way of converting code into a blueprint setup that I’ve never seen before? What does “breaking the look” mean? Is this some programmer-speak which means that due to how the engine operates on a backend level, delays cannot be added to the body of a for-loop? How does one even build a macro in UE5? I can only guess…

This is just a small gripe of mine, but I have made the discovery that people on this forum give answers that are too short and not really helpful to people with limited experience (which are the people who need their questions answered…).

This is not about you but about the comment of RevOverDrive… I don’t know what a timer is supposed to be in the context of UE5. Why would someone think if they told me “You can also do this with a Timer. You’ll need a var to represent the Last Index queried though.” that I would know what
A) A timer in UE5 is
B) That I will know how to implement a “timer solution” from just two throwaway sentences?

It seems to me like Epic has gone with the recent, god-awful trend of “positive interactions only”, which completely mutes criticism and cautioning online against bad answers and bad information. There should be a downvote button on a Q&A forum and I cannot, for the life of me, understand, how any sensible human being would come to the conclusion, that creating an online forum where people need to distinguish between good and bad answers, could work without some sort of punishment for bad practices in answering questions.

These answers are not just a small discord discussion you’re having with your buddies, they will be googled by thousands of other people, who were not here when the initial discussion was unfolding. If your answers are too short and too ambiguous, then other people finding this thread will be at a loss of how to find their solution to their problem. Please, I beg of you, treat this forum as if it were StackOverflow.

If Epic doesn’t implement better measures for quality control, since it wants to disempower users from punishing bad answers with their “positive interactions only” nonesense (thanks for that, Youtube…), then it is up to the individual to act as proper quality control.

Rant over…Thank you for your solutions.

  1. Select all of the code bellow “Code to paste into editor” (in the formatted code box) right click it and select copy or press ctrl+c on windows.
  2. Open up unreal engine load your project.
  3. Open the blueprint where you need the loop.
  4. Make sure you are in the event graph of your blueprint
  5. Paste the code that is in your clipboard (standard shortcut for paste ctrl +v)
  6. You should notice a new function will be created in the “Macros” part on the right panel.
  7. Give it a proper name
  8. drag the new macro into your event graph for testing.
  9. You can now use this macro where needed within the blueprint

Hi @ecksdeeeee, I do understand that you may be under pressure to find some urgent solution for your current problem.

Nevertheless, expecting step by step answers with complete copy/paste solutions is not always what you get from the forums. And @3dRaven even does give you kind of that - but you ask

Which editor he might be referencing to, if we talk about blueprint? Why not doing some search yourself? Similar with

@3dRaven talls about LooPs, so the looK obviously just is a typo. So again, his tip is a really valuable hint to think about and doing some deeper search.

To the comment of @Rev0verDrive your answer is:

Instead of complaining not knowing what a Timer is - what about accepting a hint and diving into this, learn about timers (you need them for sure anyway) and see if they can help?
If you read the answer of @mzaleczny, you will find that he obviously did experiment with this himself as well.

Learning is a neverending process, and I personally are very thankful to have the forum to search for answers. And honestly, I also frequently try to read the Q&A and even further, try to answer questions. And for me, this process turns out to be useful, because this process has a positive side effect on learning, sometimes even finding solutions for problems, others on the forum have and finding even new things, I would never have discovered otherwise.

Sure, ready made solutions can be helpful if you are in real pain, but hints just pointing in the right or even some compeletely different, but useful direction, are invaluable and much more precious than some step by step solutions for a very special problem.

I personally do not believe that a Punishment system like in Stackoverflow with DownVotes would be a good practice for this community forum, but that’s my personal opinion only. You always have the possibility to post your criticism and discuss your issues. That’s what a forum is about.

1 Like

Timers add control that delays do not have. You can easily Stop/Pause and then Restart a timer.

Extending the Loop to do something other than Print a string.

1 Like