Anillo III - Original — 7 of 199

Johan Paz

Release 3

Chapter 2 - Cambios

Musica-Intro-Sonando is a truth state that varies. Musica-Intro-Sonando is false.

To start musical introduction:

now Musica-Sonando is true;

now Musica-Intro-Sonando is true; [aviso: la intro ahora esta sonando!]

[asumimos que has asignado el canal con anterioridad]

play the sound of inicio in foreground[, notifying when finished].

[Esta regla captura el Soundnotify, avisa que la intro termino (para que la regla Restore-Intro-Music ya no haga nada) y finalmente reproduce la musica del juego]

A glulx sound notification rule (this is the Start-Game-Music rule):

now Musica-Intro-Sonando is false; [aviso: la intro ya no esta sonando!]

now Musica-Sonando is false;

[asumimos que has asignado el canal con anterioridad]

reponer banda sonora.

Last glulx object-updating rule (this is the Restore-Intro-Music rule):

if Musica-Intro-Sonando is true:

start musical introduction.

To temporizar cada (MS - number) ms:

(- if (glk_gestalt(gestalt_Timer,0)) { glk_request_timer_events({MS}); } -)

To activar sonidos ambientales:

temporizar cada 2000 ms. [es decir, cada 2 segundo]

To desactivar sonidos ambientales:

temporizar cada 0 ms. [es decir, desactiva el timer]

Last glulx object-updating rule (this is the Restore-Sonidos-Ambientales rule):

if Primera-Ejecucion is true: [esto solo se ejecuta 1 vez, antes de iniciar nada del juego]

now Primera-Ejecucion is false; [corrige la pifia de Windows Glulxe que te explique arriba!!]

stop; [importante: no se debe seguir ejecutando el resto de la regla!!]

if Efectos-Sonando is true:

activar sonidos ambientales;

otherwise:

desactivar sonidos ambientales.

[ Poner lo adecuado cuando termine el inicial ]

To reponer banda sonora:

now Musica-Intro-Sonando is false;

now Musica-Sonando is true;

if location is in Pantano:

play sound of pantano in foreground with loop;

otherwise if location is in Castillo:

play sound of castillo in foreground with loop;

otherwise:

play sound of cuevas in foreground with loop.

Musica-Sonando is a truth state that varies. Musica-Sonando is false.

Efectos-Sonando is a truth state that varies. Efectos-Sonando is false.

To cambiar estado efectos:

if Efectos-Sonando is true:

say "Silenciando efectos sonoros.";

now Efectos-Sonando is false;

if location is in Pantano:

stop the background sound;

otherwise:

say "Activando efectos sonoros.";

now Efectos-Sonando is true;

if location is in Pantano and location is not Pantano23 and location is not Pantano24:

play sound of efectos in background with loop.

To cambiar estado musica:

if Musica-Sonando is true:

say "Silenciando música.";

now Musica-Sonando is false;

stop the foreground sound;

otherwise:

say "Activando música.";

now Musica-Sonando is true;

reponer banda sonora.

Primera-Ejecucion is a truth state that varies. Primera-Ejecucion is true.

Tiempo musica inicial is a number that varies. Tiempo musica inicial is 0.

A glulx timed activity (this is the Gran Ambientador de Sonidos rule):

[ Cuando se va a acaba la musica inicial pasamos a la del pantano ]

if Musica-Sonando is true and Musica-Intro-Sonando is true :

if tiempo musica inicial is greater than 190:

now Musica-Intro-Sonando is false;

reponer banda sonora;

else:

increase tiempo musica inicial by 1;

if Efectos-Sonando is true:

if the location of lobo is adjacent to location and a random chance of 10 in 100 succeeds:

play the Sound of aullido in midground;

if lobo is visible and a random chance of 15 in 100 succeeds:

play the Sound of grulobo in midground;

if the location of deavork is adjacent to location and a random chance of 15 in 100 succeeds:

play the Sound of grunido in midground;

if the deavork is visible and a random chance of 10 in 100 succeeds:

play the sound of aleteo in midground;

if the location is in Cuevas:

if a random chance of 10 in 100 succeeds:

play sound of gota in midground.

[==============================

El relato

==============================]