Comunidad Game Maker

Ayuda => Preguntas y respuestas => Mensaje iniciado por: Munguia en Febrero 09, 2011, 06:11:13 AM

Título: confirmar ubicaci?n de objetos (solucionado)
Publicado por: Munguia en Febrero 09, 2011, 06:11:13 AM
Ayuda Por favor, se me rompe la cabeza :'(

tengo 11 objetos diferentes
quiero que cuando los once est?n en una ubicaci?n espec?fica se abra un mensaje de esos que dicen LO HAZ LOGRADO

no se como confirmar las ubicaciones de tantos objetos

gracias!!!! ???

Título: Re: confirmar ubicaci?n de objetos
Publicado por: Texic en Febrero 09, 2011, 06:23:29 AM
11 objetos diferentes o 11 instancias del mismo objeto??
Título: Re: confirmar ubicaci?n de objetos
Publicado por: Munguia en Febrero 09, 2011, 07:03:47 AM
11 objetos diferentes b1, b2 ...

estoy haciendo un rompecabezas de tiles, son 12 piezas pero una reaparece cuando se completa la imagen

ah, y la posici?n correcta es la posici?n de origen, pues primero se ense?a la imagen completa y luego se mezclan las partes automaticamente
Título: Re: confirmar ubicaci?n de objetos
Publicado por: Texic en Febrero 09, 2011, 08:21:04 AM
[gml]match=0
with(b1){if x=xstart and y=ystart {other.match+=1}}
with(b2){if x=xstart and y=ystart {other.match+=1}}
with(b3){if x=xstart and y=ystart {other.match+=1}}
with(b4){if x=xstart and y=ystart {other.match+=1}}
with(b5){if x=xstart and y=ystart {other.match+=1}}
with(b6){if x=xstart and y=ystart {other.match+=1}}
with(b7){if x=xstart and y=ystart {other.match+=1}}
with(b8){if x=xstart and y=ystart {other.match+=1}}
with(b9){if x=xstart and y=ystart {other.match+=1}}
with(b10){if x=xstart and y=ystart {other.match+=1}}
with(b11){if x=xstart and y=ystart {other.match+=1}}
if match=11 {show_message("Rompecabezas armado")}[/gml]
Título: Re: confirmar ubicaci?n de objetos
Publicado por: Munguia en Febrero 09, 2011, 08:37:09 AM
Texic!, muchisimas gracias, sos mi heroe :P

voy a probarlo ma?ana, ah? te cuento como me fue

Pura life!
Título: Re: confirmar ubicaci?n de objetos
Publicado por: Munguia en Febrero 11, 2011, 02:44:18 AM
Muchas gracias Texic, funciona muy bien!!!
XD