Comunidad de diseño web y desarrollo en internet online

Juego Flash caida de objetos en un mc

Citar            
MensajeEscrito el 30 Ene 2007 05:59 pm
Hola, estoy haciendo un game tipo tetris, pero con la diferencia de que abajo hay tres contenedores y segun van saliendo los objetos mediante un array, debes llevarlos a su correspondiente cubo, pero no sé cómo hacer para vincular el objeto con el mc. Es como una colisión...vamos, que no sé cómo plantearlo.

alguna ayuda?¿?¿

Por outsider

74 de clabLevel



 

Madrid

firefox
Citar            
MensajeEscrito el 31 Ene 2007 03:31 am
puedes ser un poco mas especifico?? XD

Por eveevans

Claber

450 de clabLevel

3 tutoriales

 

Nicaragua

firefox
Citar            
MensajeEscrito el 31 Ene 2007 09:01 am
utilizo este codigo en el control del clip. xpositionindex es un mc donde se carga de manera aleatoria un simbolo, pero no logro que colisionen...el cubo2 con el mc_xpositionindex...


onClipEvent (keyDown) {
if (_root.cubo2, hitTest(_root.xpositionindex)) {
trace( "Collision Detected");
} else {
trace( "No Collision");
}
if (Key.isDown(Key.LEFT)) {
if (_root.allowmovetoleft(_root.figuretype, _root.currentrotationindex, _root.ypositionindex, _root.xpositionindex) == true) {
_root.xpositionindex -= 1;
}
}
if (Key.isDown(Key.RIGHT)) {
if (_root.allowmovetoright(_root.figuretype, _root.currentrotationindex, _root.ypositionindex, _root.xpositionindex) == true) {
_root.xpositionindex += 1;
}
}
if (Key.isDown(Key.DOWN)) {
_root.speed = 10;
_root.heart();
}
}

vamos que super perdido...el tema es como un tetris...van saliendo figuras aleatorias y las debes dejar caer en unos cubos que ha abajo...si la colision obejtos-cubo es la correcta..sigues jugando..si no, pues gameover..

alguna ayuda?

Por outsider

74 de clabLevel



 

Madrid

msie
Citar            
MensajeEscrito el 31 Ene 2007 05:16 pm
SI , el hitTest esta mal escrito ,
deberia ser:

Código :

if (_root.cubo2.hitTest(_root.xpositionindex)) 

Por eveevans

Claber

450 de clabLevel

3 tutoriales

 

Nicaragua

firefox
Citar            
MensajeEscrito el 02 Feb 2007 10:54 pm
pues no, me sigue sin funcionar..;(

Por outsider

74 de clabLevel



 

Madrid

firefox
Citar            
MensajeEscrito el 04 Feb 2007 02:53 pm
El hitTest sólo se activa solo mientras apretás una tecla, tendrías que hacerlo con un enterFrame.

Por HernanRivas

Claber

3416 de clabLevel

26 tutoriales

 

Argentina

msie

 

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