This command cant be used in non-blocking events (?)

Started by Knox, Sat 10/04/2010 17:35:55

Previous topic - Next topic

Knox

Again, just fiddling for learning purposes, I placed this line into "function repeatedly_execute_always()":

Code: ags

  else if ((gAGSIntro_Txt.Visible) && (IsKeyPressed(eKeyEscape) == true)) 
  {
    player.ChangeRoom(7); 
  } 


Ive got logo intros when the game starts (Ags logo intro, studio logo intro, etc...) and some of them Ive placed as tween blocking...Now Im just adding a line in rep_exec_always that checks if the person pressed "esc" while those intro Gui's are visible...it will skip the intro's and just go to the main Title Menu Screen (which is Room 7).

Im getting this error though:
Code: ags

This command cannot be used within non-blocking events such as repeatedly_execute_always.


I tried putting it in rep_exec, no error this time when I press "esc" key, but nothing happens...the room doesnt change.

Anyone know what Im doing wrong here?

thnx

****EDIT: Ok I just used "startcutscene/endcutscene" and that works...still though, Im curious to know WHY the other line above doesnt work! :P
--All that is necessary for evil to triumph is for good men to do nothing.

SMF spam blocked by CleanTalk