View Single Post
  #26  
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.spreadthis.owner.client.spread);
  
dontblock();
  
scheduleevent(3,"StarDestroy","");
  
setTimer(0.1);
}

function 
onTimeOut() {
  if (!
onwall(this.6/16 vecx(this.dir)*7/16this.6/16 vecy(this.dir)*7/16)) { 
    
this.+= vecx(this.dird) + (this.owner.dir in {02} ? this.spread/16 0);
    
this.+= vecy(this.dird) + (this.owner.dir in {13} ? this.spread/16 0);
    
setTimer(0.1);
  }
  
triggeraction(this.6/16 vecx(this.dir)*8/16,this.6/16 vecy(this.dir)*8/16,"StarDamage",nil);

__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote