Author Topic: Ammo  (Read 876 times)

I found this in the code, is it anyway linked to the "noAmmo" state, and if it is, how do i use it?

Code: [Select]
   // Projectile && Ammo.
   item = BowItem;
   ammo = " ";

The "ammo" variable was used in the Torque FPS example for the crossbow, but isn't used/coded in Blockland.

To use the No Ammo states, you should code a way to store your ammo count and use this function:
Code: [Select]
%obj.setImageAmmo(%slot,%ammo);
... to trigger stateTransitionOn[No]Ammo in the weapon image.

Ok thanks, but is there like a "getFireCount" or something?

No. You'll have to code it.

Somebody should make a system for this.

Ammo systems only really work if more than a few people adopt using its system. Rotondo's doesn't work too well because the hundred "machine guns" that exist all overwrite the fire system and so don't work with his mod.