View Single Post
  #19  
Old 06-15-2014, 10:47 AM
blackbeltben blackbeltben is offline
Registered User
Join Date: Aug 2011
Posts: 83
blackbeltben is on a distinguished road
Quote:
Originally Posted by Jakov_the_Jakovasaur View Post
something like this?

PHP Code:
function isBlocking(tile) {
  
temp.blocktiles = {0,16,1024,1025,1026,1027,1028,1029};
  return
    
tiles[player.1.5player.2in temp.blocktiles ||
    
this.checkBlockNPCs()
  ;
}

function 
checkBlockNPCs() {

  
temp.npcs findareanpcs(player.1.5player.20.06250.0625);

  for (
temp.temp.npcs
    if (
temp.n.blocking)
      return 
true;

  return 
false;

but then im not sure its a good idea to be checking just a single pixel for collisions, graal movement usually checks the width of the players body (2 tiles or 32 pixels)

What are the 0.0625s for?
Reply With Quote