View Single Post
  #8  
Old 09-08-2010, 01:02 PM
Raeiphon Raeiphon is offline
I never asked for this.
Join Date: Jun 2005
Posts: 855
Raeiphon is on a distinguished road
PHP Code:
function onWeaponFired() {
  if (
this.out) {
    
this.doAttack();
  } else {
    
this.drawGun();
  }

Handle this.out in drawGun(); and your projectile function in doAttack(); and you're right as rain. I normally handle gani replacement within such scripts and ensuring that the weapon variables are properly set/carried across uses in functions like this at the same time. This may seem a bit sparse, but I'm sure you're capable of toggling a boolean value within a function without being told how to do it.

You really don't need to use a timeout for this.
__________________

I hope for nothing. I fear nothing. I am free.
Reply With Quote