View Single Post
  #1  
Old 01-06-2011, 12:53 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Simple Poly Line (to mouse)

Okay this is an easy one, but for some reason I cannot get a line to draw to the players mouse from a given x/y of a npc.. Any suggestions here, i know its top left, top right, bottom right, and bottom left for the order of cords.. or am i wrong here?

PHP Code:
//#CLIENTSIDE
function onMouseDown() {
  
with findImg4000)) {  
    
polygon = {
      
mousexmousey,
      
mousex-(2/16), mousey-(2/16),
      
xy,
      
x-(2/16),y-(2/16)
    };
    
layer 3;
  }

All I am trying to do is make a line draw from the npc to the mouse.. =/

It seems to be twisting, but i cant get the cords working right, grr !!
Reply With Quote