Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Help with onwall (https://forums.graalonline.com/forums/showthread.php?t=8552)

mystic_pheonix 08-01-2001 12:16 AM

Help with onwall
 
can someone give me a working onwall script so you dont go through walls? if you do ill give you credit it my script and send you a copy :)

Shard_IceFire 08-01-2001 02:37 AM

well if it's for an NPC, i THINK (key word=think) it would be like this:
NPC Code:

if (onwall(x,y-1.5)) {
y++;
}
if (onwall(x,y+1.5)) {
y--;
}
if (onwall(x+.5,y)) {
x--;
}
if (onwall(x-.5,y)) {
x++;
}


LiquidIce00 08-01-2001 05:26 AM

I dont know where I stuck mine at but the best way is to make an array with .25,.5,.75,1 ... blabla then u just run thru the array (and use vecx and vecy) to check the tiles infront of the player.

mystic_pheonix 08-01-2001 05:50 AM

uhhhh... okay


All times are GMT +2. The time now is 03:24 AM.

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