Graal Forums

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

oo_jazz_oo 05-04-2007 01:15 AM

Tiles
 
Is it possible to tell if a tile is blocking or not?
I searched the wiki, but couldnt find anything.
What I mean is, when you do tiles[x,y], is there any way to tell that that tile is blocking?
Like, if you do tiles[mousex,mousey], is there any way to tell if that tile is a blicking tile? ><

godofwarares 05-04-2007 01:20 AM

Quote:

Originally Posted by oo_jazz_oo (Post 1305341)
Is it possible to tell if a tile is blocking or not?
I searched the wiki, but couldnt find anything.
What I mean is, when you do tiles[x,y], is there any way to tell that that tile is blocking?
Like, if you do tiles[mousex,mousey], is there any way to tell if that tile is a blicking tile? ><

PHP Code:

onwall(xy)            Tells if a tile blocks you.
onwall2(xywh)     Tells if the tiles in w,h block you


godofwarares 05-04-2007 01:58 AM

Quote:

Originally Posted by oo_jazz_oo (Post 1305344)
Well, I dont want to know if it will block the player, sorry that I didnt explain better. ><
In an npc, it makes its x and y random, and I dont want it on walls, but the level is shaped weird, so doing if (x in | |){ and stuff would be hard to do...
Is there any way to tell if the tile[x,y] are bloxcking tiles? ><

Those functions return true if the tile blocks the player, and in turn the NPC as well. If the tile is a wall, Then it returns true.


All times are GMT +2. The time now is 05:17 AM.

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