It's been awhile since I've used GS2, so I may just be missing something completely obvious. Any who, I'm getting into the swing of things and I start making an online baddie, when do movement checks onwall2() always returns true. I have set the shape and the checks are outside this. When I put the baddie on the clientside though, the onwall2() works properly.
Here's the script part :
PHP Code:
this.dir = getdir( this.nx - this.x, this.ny - this.y);
temp.cX = this.dir in { 1, 3}? this.dir == 1? this.x - 1: this.x + 3.5: this.x + 0.5;
temp.cY = this.dir in { 0, 2}? this.dir == 0? this.y - 1: this.y + 3.5: this.y + 1;
temp.cW = abs( vecy( this.dir)) + 1;
temp.cH = abs( vecx( this.dir)) + 1;
if ( !onwall2( temp.cX, temp.cY, temp.cW, temp.cH) && !onwater2( temp.cX, temp.cY, temp.cW, temp.cH))
{