![]() |
Onwall
I feel like an idiot but I just saw a post on why onwall would work and that made me think about somthing. Can someone explain to me how onwall works?
|
if (onwall(x,y)) {thestuffgoeshere;} So if the NPCs x and y coordinates are on a wall/tile that cannot be walked on...the things in the brackets occur.
|
Ok, the main thing i have a problem with is how would you get a whole area like that? Sorta make a block of the x and y. So say you wanted somthing to happen when a whole certain area was touched?
|
Quote:
|
I suggest you use
!onwall(x,y) to do player onwall.. player onwall kinda bothers me to make and to explain.. I dont have any examples . i had some but i dont know where it ended up.. I suggest you make an array with like .25,.5,.75,1,1.25 and then just the values for the x,y . and theres a tutorial by Ace too that explains well which tiles Graal checks for the player.. |
say for mining or fishing u just want the weapon to fire on a certain block of area. Thats what I mean
|
Quote:
if you want mining but like on a npc u made then use triggeraction or callnpc+testnpc.. here is a code for board[] on water =) NPC Code: 322 is the index of the water tile(the swimmable one) |
Quote:
board[x + y*64] = bx + by*16 x and y are is the loc you want to check, and bx and by are the x and y values of the tile it returns (on the tileboard on the bottom right of the level editor)...I forget the math too...but you can use a formula to pull bx and by out of the responce it gives you... (someone post the math?) |
Gah...or just do what liquidice said and add em up for when you check it =/ Course...if its water your checking..jus use onwater
|
Quote:
but that u can use for other stuff |
| All times are GMT +2. The time now is 11:11 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.