Hi there!
I came across a problem whilst working on my rpg project and I hope you could help me to fix it.
I got enemies which should every now and then (~2sec) spawn a firebolt.
To shorten up my code i created an 'enemy' family.
I thougth it would be the best way to do it like this:
System.forEach(enemy) && System.everyRandomSeconds(X)
{
System.SpawnObjectAt(enemy)
}
But instead of spawing a firebolt every X seconds individually on every enemy, it resulted in something unintented. All enemies are now spawning firebolts at the exact same time (every X seconds), which is leaving the player no chance to survive the massive amount of firebolts.
However I want them all to attack (=spawn firebolts) seperatly, every one of them in it's own X seconds rythm. How do i need to modify my code to do this?
I hope it became somewhat clear what I was trying to achieve. <img src="smileys/smiley5.gif" border="0" align="middle" />
Sincerely
<img src="http://dealer-of-darkness.de/downloadbase/index.phppage=EntryImageShow&imageID=196.jpg" border="0" />