I've created a nice flamethrower in Alf the Elf II, and instead of firing a single flame, it fires a number of small flames in quick succession, in a sort of cluster. Everything's fine, apart from that I want the flames created first to appear on top of those created last, ie. be drawn last. How do I do this? Here's my code, should you want it:
I've experimented with the Last and Before commands, but I can't seem to get anything to work. Anyone know how to do this?
.flameregs For allflame.flame=Each flame allflame\x=allflame\x+allflame\xmov+(Rand(-10,10)/10) allflame\y=allflame\y+allflame\ymov+(Rand(-3,3)/3) allflame\time=allflame\time+1 If allflame\time>allflame\maxtime/5 Then allflame\size=1 If allflame\time>allflame\maxtime/5*2 Then allflame\size=2 If allflame\time>allflame\maxtime/5*3 Then allflame\size=3 If allflame\time>allflame\maxtime/5*4 Then allflame\size=4 allflame\animtime=allflame\animtime+Rand(0,1) If allflame\animtime>19 Then allflame\animtime=0 DrawImage flame,allflame\x-death\camerax,allflame\y-death\cameray,(allflame\animtime/10)+(allflame\size*2) If allflame\time>allflame\maxtime Then Delete allflame Next Return
I've experimented with the Last and Before commands, but I can't seem to get anything to work. Anyone know how to do this?