Help needed
MacBruv
Member Posts: 6
Hi I could really do with some help! I'm making a game which is a bit like space invaders. I have 3 lines of 12 enemies but am having serious problems with spawning the way I want it too! Say 5 enemies in my line of 12 get destroyed, how can I spawn those 5 enemies back into the position they were in from outside the screen? (Hope that makes sense) Also I know how to make things shoot but how can I make one of my enemies shoot after the enemy in front of it has been destroyed? It wouldn't look right if the enemy was shooting through another enemy. I'm fairly new to all of this and would really appreciate some help. Thanks
Comments
I needed to do a similar thing recently, i.e. check if an actor was in front of another and someone sent me an example where health bars follow an actor (attached). I modified it to attach a collision detecting actor to each enemy (attached).
If I were to tackle your problem I'd probably do the same again, I'd attach an invisible collision detection actor in front of your enemies. If a collision is detected it won't shoot because it means that there's an alien in front of it, otherwise it would shoot. You could probably do the same thing with the movement, although it might be easier to move your enemies down to fill the empty space, i.e. if no collision is detected and they're in the top or middle row then that would mean there's an empty space in the row below so move them down one.
You may have to devise a way to fill in the top empty slots.
Unfortunately I'm not near a copy of GameSalad and won't be until later tonight so that's the best I can do to help. In the collision detection example the detection actors are placed in the centre of the enemies so if you find it useful you'll need to change the positioning to sit at the front/below your enemies.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
I do like going around the houses sometimes.
I cant seem to get my head around tables, would it be possible for a demonstration on how I would achieve this?
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Hi @MacBruv
Hope the other guys have solved your prob. for you...
One small point: in the future, please make your thread titles more descriptive; "Help Needed" gives no indication at all of your GSC problem/question to those who would try to help you. (And most people posting new threads in the Forums want help anyway, so that goes without saying).
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps