room_LeaveBottom() function problem (SOLVED)

Started by callisto, Mon 28/04/2008 16:07:12

Previous topic - Next topic

callisto

Can someone help me here? :

I wrote this function for the bottom edge:
function room_LeaveBottom()
{
  Display("This is bottom edge");
}

but when reaching to the edge, the message apears and not goes away (even when pressing enter).
the game is stuck.


Dualnames

Well, i'd rather use regions instead. Draw them and use walk on to and walk of to. The game in your case gets stuck because the player leaves bottom edge constantly. try putting this:
Code: ags
return;

under the display function that might do the trick.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Pumaman

Well, what do you want to happen? Once the character has gone beyond the edge that function will keep running.

So either move him to another room, or walk him back. For example:

function room_LeaveBottom()
{
  Display("This is bottom edge");
  player.ChangeRoom(2);
}

OR:

function room_LeaveBottom()
{
  Display("This is bottom edge");
  player.Walk(player.x, player.y - 20, eBlock);
}


SMF spam blocked by CleanTalk