Quote:
Originally Posted by Jakov_the_Jakovasaur
i just realised that the first tile should be 0x0 rather than 1x1 as mentioned in your first post, 1x1 probably isnt even valid
should definitely work if you do:
PHP Code:
if (tiles[player.x + 1.5, player.y + 2] == 0)
taking a closer look at your snippet of code in the first post, its worth mentioning that it should be something like this if it isnt already:
PHP Code:
//#CLIENTSIDE
function onCreated()
this.onTimeout();
function onTimeout() {
if (tiles[player.x + 1.5, player.y + 2] == 0) {
player.chat = "Found Tile!";
}
this.setTimer(0.05);
}
if something doesnt work as expected then you can also attempt to debug it like so:
PHP Code:
player.chat = tiles[player.x + 1.5, player.y + 2];
|
Yay it works
But can you explain how you did get 17 though? How do I calculate what tiles are equal to what value?