Change that, too...
PHP Code:
function onActionServerSide() {
temp.npc = putnpc2(params[0],params[1],"");
npc.owner = player;
npc.join("bullet");
}
... and your projectile script too...
PHP Code:
function onCreated() {
setimg("shuriken_icon.gif");
setshape(1,12,12);
this.dird = this.owner.dir;
this.spread = random(-this.owner.client.spread, this.owner.client.spread);
dontblock();
scheduleevent(3,"StarDestroy","");
setTimer(0.1);
}
function onTimeOut() {
if (!onwall(this.x + 6/16 + vecx(this.dir)*7/16, this.y + 6/16 + vecy(this.dir)*7/16)) {
this.x += vecx(this.dird) + (this.owner.dir in {0, 2} ? this.spread/16 : 0);
this.y += vecy(this.dird) + (this.owner.dir in {1, 3} ? this.spread/16 : 0);
setTimer(0.1);
}
triggeraction(this.x + 6/16 + vecx(this.dir)*8/16,this.y + 6/16 + vecy(this.dir)*8/16,"StarDamage",nil);
}
