Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Neutron on Wed 15/10/2008 08:23:47

Title: trigger cutscenes based on local timeline
Post by: Neutron on Wed 15/10/2008 08:23:47
How would I go about triggering cut scenes or animations based on a room specific timeline, instead of interactions?  Sorry in advance if this is a dumb question.
Title: Re: trigger cutscenes based on local timeline
Post by: Khris on Wed 15/10/2008 11:11:50
You mean by using SetTimer (http://www.adventuregamestudio.co.uk/manual/SetTimer.htm) and IsTimerExpired (http://www.adventuregamestudio.co.uk/manual/IsTimerExpired.htm)?
Title: Re: trigger cutscenes based on local timeline
Post by: Neutron on Wed 15/10/2008 11:57:45
ah that should do the trick.  thanks.
Title: Re: trigger cutscenes based on local timeline
Post by: Dualnames on Fri 17/10/2008 13:21:00
Or you can work it out the Hitchhiker's way.
Set integers and place this in a repeatedly..wait just chekc the code below:


int timer[0];//better to use arrays but I prefer to name the integers

//ok now let's say you want a interaction to happen at 4 seconds
function repeatedly_execute() {
if (timer<160) {
timer[0]++;
}
if (timer[0] == 160) {
//event//
//you can reset the timer as well timer[0]=0;
return;
}
}