SOLVED: Characters collide in room_RepExec.. Need more than one todo...

Started by barefoot, Mon 12/07/2010 10:12:32

Previous topic - Next topic

barefoot

Hi


SOLVED.. Typical.... because started player near room had to add  game.skip_display = 0;...
sorry guys..least its solved it..



Update: can add more display text's etc but only on keypress not auto.. So, is there a way to make it roll on automatically?

Code: ags

function room_RepExec()
{
  if ((cmino2.x - cindy_bones.x <=50 && cmino2.x >= cindy_bones.x) || (cindy_bones.x - cmino2.x <50 && cindy_bones.x > cmino2.x))
 Display("Game Over");  

   if ((cmino2.x - cindy_bones.x <=50 && cmino2.x >= cindy_bones.x) || (cindy_bones.x - cmino2.x <50 && cindy_bones.x > cmino2.x))
 Display("Come on sonny!!");  

   if ((cmino2.x - cindy_bones.x <=50 && cmino2.x >= cindy_bones.x) || (cindy_bones.x - cmino2.x <50 && cindy_bones.x > cmino2.x))
cindy_bones.ChangeRoom(54);  
}



Previously:

I have the below code in room_RepExec that works fine..

What I would like to do is add further todo's after displaying 'Game Over'.. ie: Change player View then Display text followed by abilty to Load Game because after the 'Game Over 'is displayed the game freezes in room_RepExec.....

Code: ags

  if ((cmino2.x - cindy_bones.x <=50 && cmino2.x >= cindy_bones.x) || (cindy_bones.x - cmino2.x <50 && cindy_bones.x > cmino2.x))
 Display("Game Over");  


Any help/comments appreciated..

-barefoot-

I May Not Be Perfect but I Have A Big Heart ..

Khris

Just use brackets to do more commands, then e.g. create another room with a gruesome death pic as background:

Code: ags
  if (...) {
    player.ChangeView(...);
    ...
    Display("Game Over");
    player.ChangeRoom(15, 0, -5); // switch to room 15 with the player outside the screen
  }


In the room's after fadein, display options (Restore / Quit), either using a GUI or hotspots as buttons.

barefoot

Hi Khris

sounds good.. i'll add that to my repertoire..

cheers

-barefoot-
I May Not Be Perfect but I Have A Big Heart ..

SMF spam blocked by CleanTalk