Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Kiah on Mon 22/09/2008 02:50:01

Title: Repeatedly_Execute?!?(SOLVED)
Post by: Kiah on Mon 22/09/2008 02:50:01
I'm trying to make a timed event happen in a room i set the thimer like this>>>

function room_Load()
{
  SetTimer(1, 3);
}

Then for when it expires i have thisin the room script>>>

function repeatedly_execute(){
 
  if (IsTimerExpired(1) == 1) {
  Display("Timer 1 expired");
}
}

i think its the repeatedly_execute function not working because i tried just doing things like

function repeatedly_execute(){
 
  Display("EXECUTE DAMNIT");
}

And nothing happens?
Anyone got any ideas? ???
Title: Re: Repeatedly_Execute?!?
Post by: RickJ on Mon 22/09/2008 03:24:01
You need to create an event;  just creating a function with the name "repeatedly_execute() won't do it.  Edit the room (not the room script), you should see the room's background.  In the properties window there is a button with a lightning bolt icon.  Click on this and you shpould see a list of reoom events.  Repeatedly execute is on the list. Click in the field.  Clkick on the ... button to get the default name and open the room script. 
Title: Re: Repeatedly_Execute?!?(Solved)
Post by: Kiah on Mon 22/09/2008 05:31:57
Thnx man i appreciate it  ;D i had the same problem with a couple things i needed repeatedly execute for (cheers)'
Title: Re: Repeatedly_Execute?!?(SOLVED)
Post by: monkey0506 on Mon 22/09/2008 07:32:05
In every script except room scripts it's not necessary to create an event handler and link it this way. Rooms are just special. ;)