Comunidad de diseño web y desarrollo en internet online

[Ayuda] Puntaje en juego de equivar objetos

Citar            
MensajeEscrito el 14 Mar 2010 04:37 pm
Hola, soy nuevo aca y ayer empezé a hacer un jueguito pero no se como ponerle puntaje :(

El juego es este: http://www.fileden.com/files/2010/3/13/2792934//moonwalk0.5.swf
(tarda un pokito en cargar xq tiene música)

La idea q tengo es q cada vez q una bolita toke el piso se sume 1 a la puntuacion, pero nose que campo de texto crear ni como hacer :(

el codigo que hace q las bolitas se repitan y hagan lo del zorro es este:

Código ActionScript :

fuerza = 25;
velocidad = 0;
_root.onEnterFrame = function() {
velocidad += fuerza;
objeto._y += velocidad;
pinche._y +=velocidad
pinche2._y+=velocidad

status = _root.objeto.hitTest(_root.pinche);
   if (status ==true){
      gotoAndStop(11)
   }
status = _root.objeto.hitTest(_root.pinche2);
   if (status ==true){
      gotoAndStop(11)
   }
status = _root.objeto.hitTest(_root.pinche3);
   if (status ==true){
      gotoAndStop(11)
   }
if (pinche._y > 200){
   pinche._y = 0;
   pinche._x = random (750);
}

if (pinche2._y > 200){
   pinche2._y = 0;
   pinche2._x = random (750);

}

if (pinche3._y > 200){
   pinche3._y = 0;
   pinche3._x = random (750);

}
if (objeto._y>65) {
objeto._y = 65;
velocidad *= 0;

}

if (objeto._y < 30){
   objeto._y = 30;
}

if (objeto._y < 5){
   objeto._y = 5;
}

if (objeto._x > 660){
objeto._x = 650;
}

if (objeto._x <75) {
   objeto._x = 80;
}

}


supongo q para agregar el score tiene q ser con el status no?

agregarle a los anteriores status

Código ActionScript :

if(status==false){
score=+5;
}


como verán soy nuevo en esto xD

desde ya muchas gracias

Por KuroiNeko

1 de clabLevel



 

firefox
Citar            
MensajeEscrito el 14 Mar 2010 06:06 pm
bueno arregle lo del score, pero ahora quiero que una manzana caiga del arbolen tal tiempo

pero si pongo

Código ActionScript :

if (score = 10){
    manzana._y = 77;
}


el score siempre queda en 10 :S

Por KuroiNeko

1 de clabLevel



 

firefox
Citar            
MensajeEscrito el 14 Mar 2010 08:27 pm
listo, elimine las manzanas

pero quiciera saber como hacer q cuando toke una tecla el personaje se meuva sin delay


es decir si mantes apretada la tecla ----> y luego tokas la <----- tiene un delay antes de moverse

Por KuroiNeko

1 de clabLevel



 

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.