Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Tile Check (https://forums.graalonline.com/forums/showthread.php?t=134257733)

Jman9912 01-21-2010 09:39 AM

Tile Check
 
I know this has been asked a million times. But how can you check for a specific tile. I'm making a shovel and want to check the tile in front of the player. I have the algorithm for checking in front of the player. But what I have for checking for a grass tile is not working.

PHP Code:

 grassTile = {0x7FF};

    if (
grassTile in tile[ar[0],ar[1]]) { 


DustyPorViva 01-21-2010 09:40 AM

PHP Code:

temp.checkx player.x+1.5+vecx(player.dir)*2;
temp.checky player.y+2+vecy(player.dir)*2;
if (
tiles[checkx,checkyin grassTile) {
  
// Do Shovel Stuff



Jman9912 01-21-2010 09:48 AM

Ah. I pretty much had it backwards. Thanks.


All times are GMT +2. The time now is 07:56 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.