I am currently reworking the system I am using for the bullets on my game and they currently pool as opposed to having 3 per enemy.
The issue is becasue I am going to have 30 bullet sprites and 10 enemy sprites how would I make the collisions for them. Running if statements in forever or forever if loops doesnt seem efficient if there are over 300 possible collion combinations.
So if anyone has any ideas on how to code for the collisions without having a multitude of code running all the time then please share
Any help appreciated
[needs to be downloaded to view properly: http://scratch.mit.edu/projects/TheSalamander/772012]
Last edited by TheSalamander (2009-11-24 15:47:53)
Offline
You can color the tip of each bullet and enemy a certain color and say
when flag click
forever
if touching color [red]
do whatever u want it to do
Last edited by Ssbrawl700 (2009-11-24 16:02:16)
Offline
-facepalm-
I'm an idiot...
Thank you!
Offline
i would add this if u r taking off health from the enemy, or doing something that cud happen over and over again (like adding money etc.)
when flag clikd
forever
if touchin colour [red]
change health or wateva
wait untill NOT touchin colour [red]
this wud mean the bullet wud hav to dissapear (acivated by anothe script on the bullet) before more health cud be taken off due to that bullet.
Offline