http://es.geocities.com/yiyusforever/
player 1 :
se mueve y salta con las flechas
a=golpe suave
s=golpe fuerte
z=patada suave
x=patada fuerte
c=barrida
space+flecha abajo=hadoken
v+b=combo pios chicken...
player 2 (tecla. num)
se mueve y salta con las flechas del teclado numerico
7=golpe suave
9=golpe fuerte
1=patada suave
3=patada fuerte
0=barrida
5=hadoken
- (mas) + =combo de la refurinfunflais
Creo que por lo menos funciona, ahora la pregunta que tengo es como seria el codigo para que se defienda de los ataques, pues como veran no hay boton de defensa y eso me lleva a preguntar que codigo se puede usar para que el movie clip mantenga una accion mientras el boton queda presionado, osea se defienda o se agache todo el tiempo que presione el boton y cuando suelte termine la accion de defenderse o agacharse, ojala puedan ayudarme para darle un acabado mas decente al juego, saludos a todos y ojala me den una mano, aqui les dejo el codigo de un player, es medio rudimentario pero todavia estoy que aprendo AS:
Código :
onClipEvent(load)
{
velocidad = 10;
var ionke:MovieClip;
var wall:MovieClip;
var fight=false;
}
onClipEvent(enterFrame)
{
if(fight==false){
//codes for movement
if (Key.isDown(Key.LEFT)) {
_x -= velocidad;
_xscale=-80;
if (_root.wall.hitTest(_x, _y, true)) _x += velocidad;
if (_root.pedro.hitTest(_x, _y, true)) _x += velocidad;
}
if (Key.isDown(Key.RIGHT)) {
_x += velocidad;
_xscale=80;
if (_root.wall.hitTest(_x, _y, true)) _x -= velocidad;
if (_root.pedro.hitTest(_x, _y, true)) _x -= velocidad;
}
}
//codes for actions
if(Key.isDown(65)){
gotoAndStop(2); //punch frame
fight=true;
}
else
if(Key.isDown(83)){
gotoAndStop(3); //punch2 frame
fight=true;
}
else
if(Key.isDown(90)){
gotoAndStop(4); //kick frame
fight=true;
}
else
if(Key.isDown(88)){
gotoAndStop(5); //kick2 frame
fight=true;
}
else
if(Key.isDown(38)){
gotoAndStop(6); //salto
fight=true;
}
else
if (Key.isDown(Key.SPACE) && Key.isDown(Key.DOWN)){
gotoAndStop(7); //abuke space down
fight=true;
}
else
if(Key.isDown(40)){
gotoAndStop(8); //agache
fight=true;
}
else
if(Key.isDown(67)){
gotoAndStop(9); //patbaja
fight=true;
}
else
if (Key.isDown(66) && Key.isDown(86)){
gotoAndStop(10); //combopios
fight=true;
}
if (_root.pedro.hitTest(_root.ionke.pun1_ion.hityonke)) {
tellTarget ("_parent.pedro") {
gotoAndStop(8);
_x += 1; }
}
if (_root.pedro.hitTest(_root.ionke.pun2_ion.hityonke)) {
tellTarget ("_parent.pedro") {
gotoAndStop(8);
_x += 1; }
}
if (_root.pedro.hitTest(_root.ionke.pat1_ion.hityonke)) {
tellTarget ("_parent.pedro") {
gotoAndStop(8);
_x += 1; }
}
if (_root.pedro.hitTest(_root.ionke.pat2_ion.hityonke)) {
tellTarget ("_parent.pedro") {
gotoAndStop(8);
_x += 1; }
}
if (_root.pedro.hitTest(_root.ionke.ray_ion.hityonke)) {
tellTarget ("_parent.pedro") {
gotoAndStop(10);
_x += 1; }
}
if (_root.pedro.hitTest(_root.ionke.combo_pios.hityonke)) {
tellTarget ("_parent.pedro") {
gotoAndStop(8);
_x += 1; }
}
if (_root.pedro.hitTest(_root.ionke.p_abajo.hit2)) {
tellTarget ("_parent.pedro") {
gotoAndStop(9);
_x += 1; }
}
else fight=false;
}
