View Single Post
  #1  
Old 03-12-2007, 04:28 AM
Novo Novo is offline
[TServerDeveloper]
Join Date: Jun 2006
Posts: 448
Novo will become famous soon enough
Minor Fix for Remote setting of x,y

PHP Code:
NPC A:

function 
onMovedinitxinitynewxnewy )
  {
  
dx newx initx;
  
dy newy inity;
  for ( 
itemthis.items )
    {
    
with item )
      {
      
this.+= dx;
      
this.+= dy;
      
this.trigger"Moved","" );
      }
    }
  } 
PHP Code:
NPC 'item':
function 
onMoved()
  {
  
this.this.x;
  
this.this.y;
  } 

... Without this, when setting item.x += dx, the item position doesn't update. It only does when you actually set it this.x = this.x; in it's own script. Awkward character of GS2!
Reply With Quote