Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   onTileType(type,x,y,width,height) (https://forums.graalonline.com/forums/showthread.php?t=134259251)

DustyPorViva 05-21-2010 01:39 AM

onTileType(type,x,y,width,height)
 
onTileType(type,x,y,width,height)

Similar to onwall2 and onwater2, it would return true if the specified tiletype is found in the defined area. This would be useful for checking for things like chairs when replicating horse movement without having to do it the old fashioned way.


Also, if it can be done...

onTiles({array},x,y,width,height)

would return true if the tiles found in the specified area are found in the array. Would relieve a lot of looping that has to be done with special tile checks.

Cubical 05-21-2010 01:51 AM

Wouldn't this work?
NPC Code:

temp.tilearray = findAreaTiles();
if (temp.tile in temp.tilearray){
//dostuff
}


http://forums.graalonline.com/forums...hp?t=134258357

edit: I didn't see you said without doing it the old fashioned way.

DustyPorViva 05-21-2010 01:54 AM

Quote:

Originally Posted by Cubical (Post 1577651)
Wouldn't this work?
NPC Code:

temp.tilearray = findAreaTiles;
if (temp.tile in temp.tilearray){
//dostuff
}


http://forums.graalonline.com/forums...hp?t=134258357

With movement being built around onwall2(like most on mines) it becomes increasingly difficult to work with more specific tile checks(exceptions, or like I said, chair checks for horses) when there aren't equivalent checks for tiles.


All times are GMT +2. The time now is 12:23 PM.

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