Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Door Attribute Tile
#2
Holy shit, has anyone actually looked at this tutorial?

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..
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)