View Single Post
  #9  
Old 12-02-2008, 09:34 PM
thatdwarf thatdwarf is offline
Former UN Dev Admin
Join Date: Nov 2005
Posts: 42
thatdwarf is on a distinguished road
Mk, so Tig's example didnt work as well as I would have hoped, might just be me. Here is what I'm working with:

Initially this.on = false and this.delay = 1;

PHP Code:
function onWeaponFired() {
  
this.on true;
  
doGani();
  
onTimeout();
}

function 
onTimeout() {
  if (
keydown2(getkeycode("f"), true)) {
    
this.delay++;
  }
  if(
this.delay 1) {                //check if semi or auto
    //ammo check here
    
freezeplayer(.1);
    
setani("gunganishere""");
    
temp.angle getangle(vecx(player.dir), vecy(player.dir));
    
setshootparams(STUFF GOES HERE); 
    
setShootCoords();
    
shoot(this.shootcoords[0],this.shootcoords[1], player.zrandom(temp.angle, (temp.angle this.accuracy) * .4),NULLNULL"blueball3""");
    
this.delay 0;
  }
  
setTimer(.1);

Reply With Quote