View Single Post
  #7  
Old 09-03-2012, 03:22 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
Doesn't seem to be working, at all now.

PHP Code:
function onActionServerside(commandnxny) {
  
chat command;
  
this.chat command;
}

function 
onCreated() {
  
setshape2(1getimgwidth(this.image), getimgheight(this.image));
  
this.oox this.x;
  
this.ooy this.y;
}

//#CLIENTSIDE
function onCreated() {
  
this.catchEvent(GraalControl"onMouseDragged""onMouseDragged");
  
setshape2(1getimgwidth(this.image), getimgheight(this.image));
  
this.oox this.x;
  
this.ooy this.y;
}

function 
onMouseDown() {
  if ( 
mousex in |x,x+getimgwidth(this.image)/16| && mousey in |y,y+getimgheight(this.image)/16| ) {
    
this.ox mousex x;
    
this.oy mousey y;
    
this.candrag true;
  }
}

function 
onMouseUp() {
  if ( 
this.candrag == true ) {
    
triggeraction(this.oox .5this.ooy +.5"Serverside""test");
    
this.candrag fasle;
  }
}

function 
onMouseDragged(objmodmxmy) {
  if ( 
this.candrag == true ) {
    
mousex this.ox;
    
mousey this.oy;
  }

"this.oox" and "this.ooy" are the x and y when created serverrside, it sets shape both clientisde and serverside.. it triggers at the first x/y values serverside.. and now it wont even work retardedly.. =/

I am guessing I am going to need to "showimg()" where it will be shown while dragging, THEN update the x and y?
Reply With Quote