javier lozano escribió:
Vale, después de varios intentos, he descubierto una forma un poco "chapucera" de hacerlo. Lo que he hecho ha sido crear salas vacías e independientes al juego, de forma que el jugador no pueda acceder a ellas. A esas salas les he asignado una imagen diferente y cada vez que el jugador realice el cambio deseado (pues los tiene que hacer en el orden correcto sí o sí) cambiara la imagen. No se si me entenderéis (soy penoso explicando). Os dejo los códigos por si a alguien le hacen falta:
Figure of laboratorio is the file "laboratorio.png".
After of looking in laboratorio:
if the caja is in laboratorio, change currently shown picture to the Figure of lab2;
if the caja is in laboratorio, follow the current graphics drawing rule;
if the brazos are in laboratorio, change currently shown picture to the Figure of lab3;
if the brazos are in laboratorio, follow the current graphics drawing rule.
Lab2 is a room.
Figure of lab2 is the file "laboratorioo.png".
Lab3 is a room.
Figure of lab3 is the file "laboratoriooo.png".
Lab4 is a room.
Figure of lab4 is the file "laboratorioooo.png".
After quipping when the current quip is Si:
move the caja to laboratorio;
move the boton to laboratorio;
wait for any key;
try looking.
Instead of pushing the boton:
move the brazos to laboratorio.
No necesitas crear Lab2, Lab3 ni Lab4. 'Figure of lab4' entero es simplemente un nombre, no se tiene porqué corresponder con un lugar. A parte a mí me gusta hacerlo 'before looking' pero eso ya es manía...
Puedes simplificar un poco el código de esta forma:
Código:
Figure of laboratorio is the file "laboratorio.png".
After of looking in laboratorio:
if the caja is in laboratorio:
change currently shown picture to the Figure of lab2;
otherwise if the brazos are in laboratorio:
change currently shown picture to the Figure of lab3;
follow the current graphics drawing rule.
Figure of lab2 is the file "laboratorioo.png".
Figure of lab3 is the file "laboratoriooo.png".
Figure of lab4 is the file "laboratorioooo.png".
After quipping when the current quip is Si:
move the caja to laboratorio;
move the boton to laboratorio;
wait for any key;
try looking.
Instead of pushing the boton:
move the brazos to laboratorio.
Y... imagino que te falta el código para mostrar el dibujo inicial, ¿no?