Doesn't seem to be working, at all now.
PHP Code:
function onActionServerside(command, nx, ny) {
chat = command;
this.chat = command;
}
function onCreated() {
setshape2(1, getimgwidth(this.image), getimgheight(this.image));
this.oox = this.x;
this.ooy = this.y;
}
//#CLIENTSIDE
function onCreated() {
this.catchEvent(GraalControl, "onMouseDragged", "onMouseDragged");
setshape2(1, getimgwidth(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 + .5, this.ooy +.5, "Serverside", "test");
this.candrag = fasle;
}
}
function onMouseDragged(obj, mod, mx, my) {
if ( this.candrag == true ) {
x = mousex - this.ox;
y = 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?