View Single Post
  #23  
Old 02-07-2010, 08:00 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Here's what we use on Era Dev. It's as accurate as possible, just make sure you have the actual point you hit at the right location. Try showing a polygon dot there until it's correct.

PHP Code:
function attackPlayers(dxdy) {
  for (
temp.pl findNearestPlayers(dxdy)) {
    if (! (
dx in |pl.xpl.3| && dy in |pl.ypl.3|)) {
      continue;
    }
    
    
pl.chat "owww!!!";
  }

We're using this for melee attacks:
PHP Code:
temp.dx player.1.5 vecx(dir) * 2;
temp.dy player.vecy(dir) * 2
so looks like everything is good
__________________
Reply With Quote