View Single Post
  #25  
Old 12-14-2008, 03:32 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
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);
} 
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote