Game

Im making a game with that firing thing i have a few questions, few have been mentioned before i believe, but i lost track of the topic and i searched for it and there was way to many topics…

Anyway, i made a game based on that crab.

I have made the enemies.
I have made things that if the ship touches, it dies.
Ihave made things taht if bullet touches, it disapears.

But out of them 3, i have only made the picture, i have no idea for the action script.

I want the enemies to randomly come at random times, also i want the obsitcals to come at random times.

Also, action script for walls and such.

-Thx in advanced.

P.S dont tell me to search, i have.

Well i’m no game programmer so I can’t help you out much, but maybe this guy can…

http://www.kirupaforum.com/forums/showthread.php?s=&threadid=25602

I am no game code either, but here are some fla files I have picked up that may be able to help you.

TD

Its helped with enemies, but when i hit them i dont die, and when i shoot them, they dont die.

Edit- Also, i want the enemies to come downwards, not sideways.

You need collision detection to work out when two objects eg: you and the enemy have come together, then on that event, move to an explosion movie inside one of the sprites…

How would i do that?

This is a Flash 5 tute, but the theory remains the same for MX - http://www.kirupa.com/developer/actionscript/hittest.htm . Once you’ve got the movie able to tell when two objects have touched, you can just alter the code that happens on the event to destroy either your sprite or an enemy sprite.

all sounds easy but can you do it (-:

Me? Yes. :slight_smile: I’ve got a Space Invaders game around somewhere, hang on let me see if I can find it… That’s got collision detection in it, might be helpful. :slight_smile:

well this will give me something to do

that and make me site:)

onClipEvent (load) {
	baddepth = 1000;
	_root.i = 0;
}
onClipEvent (mouseDown) {
	_root.i++;
	laserCheck++;
	_root.fired++;
	_root.shot.duplicateMovieClip("bullet"+_root.i, _root.i);
}
onClipEvent (enterFrame) {
	_root.perc = Math.round((_root.score/_root.fired)*100)+"%";
	if (laserCheck>50) {
		_root.i = 0;
		laserCheck = 0;
		trace("laser reset");
	}
	chance = random(35);
	if (chance == 10) {
		baddepth++;
		_root.baddie.duplicateMovieClip("baddie"+baddepth, baddepth);
	}
}

Well this is from tobys game, it works here but the enemies are going the wrong way, how do i make them go downwards and not sideways. Also there is only one enemy coming towards me now…

There it is so far…

Bump