Problem with repeatedly_execute in rooms (SOLVED)

Started by TheMagician, Sun 23/04/2006 12:46:00

Previous topic - Next topic

TheMagician

Hi everybody,

If I write only this in the room code

Code: ags

// 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

Scorpiorus

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.

TheMagician

Thanks Scorpiorus.
Sorry for not looking it up in the tracker.  :-\
Stefan

Scorpiorus

No problem, and I refered to the tracker entry so that the thread was linked to it and anyone could possibly support this feature ;)

Radiant

Code: ags

Global script:

function repeatedly_execute () {
  CallRoomScript (1);
}



Room script:

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



Works like a charm.

SMF spam blocked by CleanTalk