Turn a Turret with the Mouse
par mvrb
Ajoutez sur l'écran d'accueil pour un accès rapide
Installer ce jeu
Touchez le bouton Partager, puis « Ajouter à l'écran d'accueil » pour installer ce jeu et y accéder rapidement.
Turn a Turret with the Mouse
Tags pour Turn a Turret with the Mouse
Description
Dans ce tutoriel, vous apprendrez à faire pivoter une tourelle lorsque vous déplacez votre souris. Elle pourra aussi tirer lorsque vous cliquez.
Comment jouer
Déplacez votre souris et cliquez.
Commentaires
GameBuilder15
Jun. 05, 2010
it doesn't work! I think it's missing some code on the bullet...?
Tukkun
May. 04, 2009
Fail for not using 30+ fps
irevol
May. 02, 2009
cooooool.... but i think it is copy of emanuele feronato's tutorial
gofish
Oct. 02, 2011
The code for actually making the bullet move is not there, it's a bad tutorial.
jbggod
Nov. 22, 2010
The bullet dosn't work??? put this code in the shot: onClipEvent(load){
spd=20;
_x=_root.gun._x;
_y=_root.gun._y;
_rotation= _root.gun._rotation;
}
onClipEvent(enterFrame){
if(_name == "shot"){
_x = -1000;
}else{
if (_rotation>180) {
_y += (spd*Math.cos( Math.PI/180*_rotation));
_x -= (spd*Math.sin( Math.PI/180*_rotation));
} else {
_y -= (spd*Math.cos (Math.PI/180*_rotation));
_x += (spd*Math.sin( Math.PI/180*_rotation));
}
}
if(_x>Stage.width || _xStage.height){
this.removeMovieClip();
}
}
other whise good tutorial