View Single Post
  #5  
Old 02-06-2010, 08:26 PM
Immolate Immolate is offline
Indigo
Join Date: Dec 2009
Posts: 322
Immolate is on a distinguished road
Quote:
Originally Posted by Engine View Post
I have another problem with showpoly, I figuired I might as well put it in here instead of making a new thread.
PHP Code:
function blahblah(){
  
polytest showpoly(200,{blah,blah,blah,ect});
}
function 
ifthishappens(){
  
polytest.mode 1;//works
  
polytest.red 0.5;//works
  
polytest.blue polytest.green 0//works
  
polytest.player.x//doesnt work
  
polytest.player.y//doesnt work

Is there a reason why this wont work?
Well, I think it's because polygons have multiple coordinates, but I'm not sure. To make it equal to the player's coordinates, you'd just draw every point on the polygon relative to them. For example:

PHP Code:
showpoly200, { player.xplayer.yplayer.5player.} ); 
This would draw a straight horizontal line relative to the player's position.

It's also probably a better idea to use a this. variable instead of a global variable.
Reply With Quote