The user dont' move!!
[AS] One avatar per tile
Hello! I have muy own MMOCC made in flash like bittybay or HabboHotel but I have a trouble with avatars; Avatars are devolved, are not solid, and I would like to solve this problem, such as in the examples of TonyPaa, the example ISO MOUSE (tut1.
Ex:
If an avatar are in tile x: 2 y: 2 With another avatar I click x: 2 y: 2 the avatar wals to the tile but don't stop one after, the two avatars in the same tile
Ex:
If an avatar are in tile x: 2 y: 2 With another avatar I click x: 2 y: 2 the avatar wals to the tile but don't stop one after, the two avatars in the same tile
Dunno. And if statement?
I'm no AS coder but I would assume it would work like this:
When someone moves to a tile it would perform a check to see whether the tile you are trying to move to is walkable: Code:
When someone moves to a tile it would perform a check to see whether the tile you are trying to move to is walkable: Code:
The idea is make the avatar solid. The same thing happens in BittyBay.
If you really want to solve this a method would be to make sure you have each avatars location stored in variables somewhere and a function which checks if there's an avatar on that square.
Code:
Code:
Tnx EGONick!!
I make it because I have 8 Positions programmed and the avatar can go in diagonal (X,Y,Z)
But, where i have to put the function?
I make it because I have 8 Positions programmed and the avatar can go in diagonal (X,Y,Z)
But, where i have to put the function?
I'm assuming you have a check if the tile's walkable, it would go in with that if statement.
Code:
Code:
like this?
Code:
Code:
No, that'll be your tile definition. It'll be in your moveChar function.
is these the function:
Code:
Code:
Recovered from /coding-wise/8570-one-avatar-per-tile-2.html · captured 2008.