Shooting Tutorial
par CoolioJulio
Shooting Tutorial
Tags pour Shooting Tutorial
Description
Apprenez à créer un simple jeu de tir. Vous devriez suivre mon premier tutoriel pour apprendre à déplacer le vaisseau ! Cherchez simplement Profil : CoolioJulio, c'est l'un de mes jeux !
Comment jouer
Flèches pour bouger et espace pour tirer !
Mises à jour des développeurs
Here is the code so you can copy and paste it!
var i = 0;
var score = 0;
var lives = 3;
this.onEnterFrame = function()
{
if (Key.isDown(Key.RIGHT))
{
if (Ship.hitTest(550, Ship.y, true))
{
Ship.x -= 7;
}
Ship.x += 7;
}
else if (Key.isDown(Key.LEFT))
{
if (Ship.hitTest(0, Ship.y, true))
{
Ship.x += 7;
}
Ship.x -= 7;
}
else if (Key.isDown(Key.UP))
{
if (Ship.hitTest(Ship.x – 40, 0, true))
{
Ship.y += 7;
}
Ship.y -= 7;
}
else if (Key.isDown(Key.DOWN))
{
if (Ship.hitTest(Ship.x – 40, 300, true))
{
Ship.y -= 7;
}
Ship.y = 7;
}
if (Key.isDown(Key.SPACE))
{
i+;
_root.attachMovie(“Bullet”, “Bullet” + i, _root.getNextHighestDepth());
root[“Bullet” + i]._x = Ship.x + 3;
root[“Bullet” + i]._y = Ship.y;
}
}
Commentaires
sirolf2009
Jul. 04, 2009
i had a lot of errors, ive make them all good but its still not working
PaladFKStatium
Jul. 02, 2009
The shooting programming does not work at all. The code is completely wrong, it is incomplete - the fact that you put up the tutorial and following your own code that you can't shoot is kind of a fail. Also, it is not a problem with your computer. It is the source of incomplete code, completely assigned wrong, to begin with. Don't blame your computer for not being able to program properly
Heylon
Jun. 30, 2009
SINTAX ERROR-dude even my self created code works better. this code is so dead not even i can fix it. i fixed most of it.
wootithink
May. 27, 2009
Ehhhhhh
CoolioJulio
May. 18, 2009
The code works. I tried it out on a different file!