Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: TheMagician on Sun 23/04/2006 12:46:00

Title: Problem with repeatedly_execute in rooms (SOLVED)
Post by: TheMagician on Sun 23/04/2006 12:46:00
Hi everybody,

If I write only this in the room code


// room script file

function repeatedly_execute() {
 
  if (IsKeyPressed(66) == true) {
    Display("Test");
  }

}


the rep_ex doesn't seem to get run ... no reaction on keypress.
Am I doing something wrong?
Greetins,
Stefan
Title: Re: Bug in latest beta version "repeatedly_execute"?
Post by: Scorpiorus on Sun 23/04/2006 12:57:04
It's just that repeatedly_execute is not yet supported in room scripts. So use the Interaction Editor rep_ex event function instead.

http://www.adventuregamestudio.co.uk/tracker.php?action=detail&id=514

repeatedly_execute_always would work though.
Title: Re: Bug in latest beta version "repeatedly_execute"?
Post by: TheMagician on Sun 23/04/2006 13:15:39
Thanks Scorpiorus.
Sorry for not looking it up in the tracker.  :-\
Stefan
Title: Re: Problem with "repeatedly_execute" [SOLVED]
Post by: Scorpiorus on Sun 23/04/2006 13:21:10
No problem, and I refered to the tracker entry so that the thread was linked to it and anyone could possibly support this feature ;)
Title: Re: Problem with "repeatedly_execute" [SOLVED]
Post by: Radiant on Sun 23/04/2006 18:31:33

Global script:

function repeatedly_execute () {
  CallRoomScript (1);
}



Room script:

function on_call (int n) {
  if (n == 1) {
    ... code ...
  }
}



Works like a charm.