How Would I Spawn in 10 of the same actor but with a random delay for each spawn?
So i'm trying to recreate one of my favorite skills from an old game i used to play, Battlefield Play4free. I'm trying to recreate the Mortar Strike Skill which allowed the player to use a pair of binoculars and target a random point on the map, but with in a certain range of the player. I've got it so that it spawns in the number i want but their all at once. I'm trying to figure out a way to have it kind of random in terms of spawning them in. like between (half=0.5 seconds) and a (full=1 second).
asked Oct 22 '16 at 09:10 AM in Blueprint Scripting
If I see this correctly, the SpawnMortarFunction spawns one mortal per call.
So you could just add a "delay" node in front of it with a "RandomFloatInRange" node in Front of it. Then the air strike is between 5 and 10 secounds.
Or do you want them all 10 spawned between 0.5 and 1 sec, so the air strike take maximum 1 sec?
Then you could ad a delay of 0.5 secs in front of the loop.
After that you need a new variable called "Maximum Remaining Time" or so, set it to 0.5 secs default.
Now you place a delay node in front of the MortarCall with a random float in range from 0 to MaximumRemainingTime. Of course you have to substract this random value from the MaximumRemTime float.
Is this what you are looking for?
answered Oct 22 '16 at 09:27 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here