a Bug!

Started by InCreator, Mon 22/03/2004 18:29:07

Previous topic - Next topic

InCreator

Okay.
I have two switchable players.
This is done from a GUI button, which has really simple script:

if (GetGlobalInt(100) == 1)
{
SetPlayerCharacter(INC);
SetGlobalInt(100,2);
}
else
{
SetPlayerCharacter(VAZ);
SetGlobalInt(100,1);
}

Simple. Now, problem is that when I make one character walk to a non-walkable area (non-directly)
And while he's walking, switch to another character, he (previous one) walks excactly (directly) to the point he was commanded to walk to, ignoring the fact that it was a non-walkable area. When switched back to character assigned to move, I was surprised that he was standing on a non-walkable area. Characters were in separate rooms.

So, my guess is that problem is in AGS part, where it commands charaters to move, while they're not active player characters and not in current room.

I provided my simple code to ensure that *I* didn't do anything wrong and problem is in AGS itsself.

Movement command was made with walk cursor, so It couldn't be direct (ignore walkables) any way.


Kweepa

Hmm, I don't think you could call that a bug exactly...
A character moving in another room won't have access to a walkable area, since only one room is loaded at any time.
Of course if the character in the other room is using the *current* walkable area then it's a bug.
Otherwise, I'm not sure what the desired behaviour is. I think the best thing would be for the game to fast-forward (like when skipping a cutscene) the movement of any characters in the room when you leave it.
So yeah, it's probably a bug :)
Still waiting for Purity of the Surf II

Pumaman

Well spotted - this is a bug, it moves the character to a walkable area in the new room. I'll get it fixed.

As a workaround, use StopMoving before you change the player character.

InCreator

#3
I just added && (character[GetPlayerCharacter].walking == 0) to globalint checking to make sure current character isn't moving before changing character. But yes, It could be fixed in next release.
This is first time I noticed something so difficult to explain.
But It can tested simply, make 2 rooms and 2 characters, then send one to another room, make him walk somewhere where isn't a walkable area and as he gets moving, change character fast to first one... It did some other weird stuff too, but I think that was already my mistake.

Oh yeah, remembered. If two characters start game in a room below the edge which sends them into another room (by edge script), first character won't be sent to another room because game has just started. But as soon you change character, script will execute and another character finds himself in a new room without chance to do anything first.




SMF spam blocked by CleanTalk