Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


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 09:13 PM.


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