character stalls in next screen intermittently (SOLVED)

Started by gypsysnail, Mon 07/01/2008 13:59:09

Previous topic - Next topic

gypsysnail

Hi,
Just a simple question to a problem that has been happening for awhile in my game. When I test the game, and I walk the character to the next screen, sometimes the character stalls and cant move so I have to quit the game or restore it. Yes I get the coordinates right though... the type of screen the character enters is from a corner, left bottom corner and I set the coordinates for the character to enter into that room at that point. Often works fine, but sometimes character stalls at entry. Any ideas why this might be happening?
Believe in afterlife! It's true in a metamorphical way ;)
Ken & Roberta - my inspiration!! 20 years.
U are what you love doing and passionate about - keep up what you love most.

Candall

The only thing I know of that could cause a character to get stuck is to enter at a point that isn't a walkable area.  If you're using set coordinates, though, I don't see how this could be a problem sometimes and not a problem other times.

Are you using the room edges to determine whether the character has left?

Baron

It's possible if you have a very narrow walkable area for the character to get caught sometimes.  In any event, I recommend a quick bit of code in Player Enters Room After Fade-In:

if (cTheCharacter.PreviousRoom == 16) cTheCharacter.Walk (x, y, eBlock, eAnywhere);

The important bit being the eAnywhere, which will allow the character to walk over non-walkable areas.  It will make the character appear to walk into the room, rather than just appear at its edge.  I often use it when I have a player entering from the bottom of the screen.  I have the characters feet transport to about forty pixels off the bottom of the screen, and then use the code above to walk him up to the walkable area.

Baron

gypsysnail

Hey guys thank you!! I got it instantly!! I had made that walkable area so long ago, a year and half ago when I was much more novice then lol! :) I sure made heaps of mistakes with those areas and the like in those earlier days of my ags journey ;). Thanks again guys! :)
Believe in afterlife! It's true in a metamorphical way ;)
Ken & Roberta - my inspiration!! 20 years.
U are what you love doing and passionate about - keep up what you love most.

Candall

No problem!  I'm happy to hear that it worked out!

SMF spam blocked by CleanTalk