Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-16-2006, 01:09 PM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
testnpc

In my attempts to expand my custom movement system that I plan to use on Classic, I have made functions to detect players on x,y,w,h (though it depends on how reliable testplayer(x,y) is) and tiletypes on x,y,w,h... however, because players have a constant width and height, and round to the nearest 0.5, coordinate, they're easy to detect.

However, I have come to certain a point. I want to be able to test for NPCs using the x,y,w,h method. There, is, however, no way in the current scripting language to script this efficiently. NPCs can have any x and y value (clientside), and any width and height value (clientside). They round to the nearest 16th (well, 16ths is all that matters for the movement system anyways). In order to make the testing precise for NPCs, you would have to check every pixel of the defined area to test for it. I wouldn't do that.
However, onwall2 IS able to test NPCs, though I wouldn't know how.

perhaps an onNPC(x,y,w,h) function could be made?
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 01:39 AM.


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