16-12-2007, 08:34 PM
Holy shit, has anyone actually looked at this tutorial?
Look at this line, for deciding whether you can walk into a door or not:
GetPlayerX(Index - x)?
It should be GetPlayerX(Index) - 1
The way he had it is checking an index lower than yours, to whatever the hell x was.
then just after it..
Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Type
That's checking if you're standing ON a door.
Tons of them are messed up, the direction up ones are checking the X variables instead of Y..
Look at this line, for deciding whether you can walk into a door or not:
Code:
If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index - x), GetPlayerY(Index)).Type TILE_TYPE_DOOR Or (Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Type = TILE_TYPE_DOOR And TempTile(GetPlayerMap(Index)).DoorOpen(GetPlayerX(Index) - 1, GetPlayerY(Index) + 1) = YES) Then
GetPlayerX(Index - x)?
It should be GetPlayerX(Index) - 1
The way he had it is checking an index lower than yours, to whatever the hell x was.
then just after it..
Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Type
That's checking if you're standing ON a door.
Tons of them are messed up, the direction up ones are checking the X variables instead of Y..