I want to create an ability in my game where you can throw a ball (<-- example) and after it either hits something or delay is completed (2 seconds) it explodes AND creates more 2 balls and which also explode (though only after 0,2 seconds) then spawning 2 from each ball so you have 4 balls which also explode after 0,1 seconds, and they spawn another 2 each making 8 balls in total which also explode after 0,2 seconds and create 2 for each, spawning 16 in total and blowing them up after 0,1 seconds and then summoning 8 each for a total of 128 balls which explode simultaneously after 0,2 seconds (i was thinking that that might be a bit draining for the pc so just 1 big explosion in the center of them all)
Math is: 1x2x2x4x8=128
You would need to set up an “On Hit Event” when the ball contacts a wall or other actor. Then after it registers a HIT event, have it spawn a new ball using the “Spawn Actor From Class” node, you can simply put 2 of those nodes back to back or you can loop the execution wire back around to use the same node but if you do that you will need a variable to keep track of the number of times it went around to limit it to only spawn 2 balls per HIT event. Use delays in between the spawn nodes or the loop to get the delayed spawn you want. If you want it to also do this after a 2 second delay regardless of whether it hit anything you could use a delay after begin play that then connects to the set-up described above. The end of all of this execution should be a “destroy actor node” so the original ball is destroyed and doesn’t also spawn extra balls when the delay finishes if it has not already fired a HIT event.