Juansero29 / SFDScripts

My Superfighters Deluxe Scripts
GNU Lesser General Public License v2.1
1 stars 3 forks source link

Expand overheat usage #47

Open GenericUsername27 opened 3 years ago

GenericUsername27 commented 3 years ago
  1. Currently only magnum uses overheat, I'd like to add it to M60 as well. Since M60 is not overpowered right now, and lowering the cost also is not really viable, I'd add a permanent scope to M60.
  2. Make it so that if the heat of the gun after firing is higher than 90%, the fired projectile is treated as fire ammo.
Juansero29 commented 3 years ago

I agree with the first point.

With the second one, though, I wonder if it wouldn't be too op to add fire ammo to weapons just before overheating. It could be a nice touch of realism, but it would have to be well balanced. Good idea though.

GenericUsername27 commented 3 years ago

I've run into an issue with the second point: The method OnFire() is called after the gun has fired, as in the bullet is no longer in the magazine, but it is called before GlobalGame.GetProjectiles() detects the bullet. Meaning I can not add a single round of fire ammo into the gun, and neither can I set the projectile to be fire ammo inside of the OnFire() method.

Do you have any idea how to do this except by adding into WeaponTrackingUpdate() something along the lines of: if(overheating>=90) AddSingleFireRound(); else if(wasoverheated) RemoveSingleFireRound(); The problem with this is that as far as I can see, you can only set ammo to a certain value or add clips, I don't see how you can set ammo to 1fire bullet and e.g. 5 normal bullets and 1 clip.

I suppose one could keep track of all the bullets a gun has fired (in WeaponTrackingUpdate) and if heat goes over 90 the next bullet is, as soon as it is detected, set to fireammo.

And if all my ideas are bad ones and you don't have any other ones, I'll only add the M60 overheat.

Juansero29 commented 3 years ago

Maybe another way to make pseudo fire bullets is to simply spawn a fire node when a bullet that has been shot by a player with overheating hits its destination. No need to change the ammo explicitly to fire ammo. Could that work?