Wintermute Engine is no longer actively developed.
The original sources are archived on GitHub: wintermute-engine and wmelite. The runtime is now integrated into ScummVM, which runs Wintermute games on current systems.
Vincula el siguiente script a tu actor para ejecutar alguna acción cuando esté desocupado durante algún tiempo (5 segundos en este caso)
#include"scripts\base.inc"var IsIdle = false;
var IdleStartTime = 0;
while(true)// bucle sin fin {if(actor.Ready)// el actor está haciendo algo {if(!IsIdle){// el actor entra en el estado **desocupado**
IsIdle = true;
IdleStartTime = Game.CurrentTime;
}elseif(Game.CurrentTime - IdleStartTime > 5000)// si el actor está desocupado durante 5 segundos {
IdleStartTime = Game.CurrentTime;
actor.ApplyEvent("idle");
}}else IsIdle = false; // el actor está ocupado; marcar IsIdle como False Sleep(100); // esperar 100 milisegundos }//////////////////////////////////////////////////////////////////////////////// on"idle"{// hacer algo aquí
actor.Talk("¡Qué rolloooo!");
actor.GoTo(Random(0, 1000), Random(0, 600));
}
es/resource/triggering_actions_when_actor_is_idle.txt · Last modified: 2010/03/19 13:57 by saboteur