repeatedly_execute_always for Rooms?

Started by Rocco, Fri 15/06/2012 11:33:23

Previous topic - Next topic

Rocco

i would need a room function
Code: AGS
function room_RepExec_always()

cause when the player performs an additional animation with LockView and animate....
some things that are going on in the background stucks meanwhile.
Is there a an similar function like the normal repeatedly_execute_always() function for rooms?


Khris

Just use exactly that:
Code: ags
// inside room script

function repeatedly_execute_always() {
  ...
}


Edit: room_RepExec isn't executed during blocking events, that's why Rocco asked for rep_ex_always

Rocco

#3
perfect, big thx.  :-D
Code: AGS
function khrismuc_knows_everything_always()


and if i read the manual more attentively next time, i would too.  :P
Quote from: AGS-HelpTo create repeatedly_execute_always, you can simply paste it into the script as above -- but you can also paste it into room scripts.

EchosofNezhyt


monkey0506

I still think the default name for the room-based rep_ex function should be repeatedly_execute not room_RepExec. I get that CJ was trying to show that this is a function that has to be linked to the room's events, but still it's a complete regression against every other ASC script file. It would also be nice if events could be automatically linked if no event handler existed but a function was added with the default name (would save a lot of Beginner's threads for the lightning bolt icon, no?).

EchosofNezhyt

#6
Quote from: monkey_05_06 on Fri 15/06/2012 15:53:14
I still think the default name for the room-based rep_ex function should be repeatedly_execute not room_RepExec. I get that CJ was trying to show that this is a function that has to be linked to the room's events, but still it's a complete regression against every other ASC script file. It would also be nice if events could be automatically linked if no event handler existed but a function was added with the default name (would save a lot of Beginner's threads for the lightning bolt icon, no?).

Yeah, That seems simple enough and starting off you could get confused with that error if you delete the code but leave the event.

ThreeOhFour

Quote from: monkey_05_06 on Fri 15/06/2012 15:53:14
I still think the default name for the room-based rep_ex function should be repeatedly_execute not room_RepExec.

I agree with this, it's a sensible change.

SMF spam blocked by CleanTalk