New to the forum and Java! It's rather lovely on here so thought I would sign up.
I've spent a couple of weeks mulling over tutorials online and I even bought a SAM's teach yourself java and think I've cracked the basics.
However I've started writing wee games now. After a couple of really simple projects I happened upon the Space Invaders tutorial and thought I'd play with that.
It went successfully, and i've since added a few weapons to the game, created a 'boss character' as well that takes 10 shots to kill with a specific weapon that can be acquired after shooting a passing alien/ufo style thing.
However. Despite this I have absolutely no idea how to implement a means of the aliens/boss shooting back.
I figured I needed to set up a timer, and then allow to randomly fire back based on a 1-100 random number allocated to each alien, and based on this timer.
No idea where to start though?
Could anyone point me in the right direction regarding this?
My other issue, is that when shooting at the aliens, I want the shots to change .gif files every alternate shot. So for example calling shot 1 a, and shot 2 b, then looping round from a to b as the rounds are fired in rapid succession. Anyone got a notion of how to do this?
I'm sure it is all very easy but I'm unaware of what statement I should be devising in order to do this.
Hope somebody can help! Thanks