I don't mean one object spawning another - I mean how can I get an instance of an object (in this case "fire") to spawn another "fire" instance when the first one is created? I would like to be able to loop it X amount of times so as one "fire" is made it spawns another "fire" which in turn spawns another and so on.
I'm basically trying to make a fire effect that "spreads" or "grows " around the area the first instance spawned. The individual fire sprites would also lower their opacity slowly and then get destroyed when it = 0.
I've been fiddling around with it, but all I can think of is having 4 imagePoints on the "fire" sprite (above, below and to the sides) which I use to spawn the second "fire" instance.. which then continues to do that X amount of times. I'm pretty sure what I'm doing at the moment is resulting in an infinite loop (as variations of this technique result in the game not even loading) but I can't wrap my head around it! It's 5am here currently and I've been up for a long time so I figured I'd post here to get some input from the experts, before heading to bed.
I really hope I've articulated this correctly! I'll bullet point what I'm trying to do... just in case
-First fire object spawns from external event
-Fire object spawns a second fire object either above, below, left or right of it(at random) when it is created
-Repeat X amount of times to create illusion of a "firebomb" spreading from the point of origin.
-Fire sprites slowly fade, so it looks like they are burning out (I can handle this part...just putting it here for the sake of clarity)
Thanks for reading and if anyone can help - thanks ahead of time!
Peace! x