Author Topic: Automatic Gun Reload - SOLVED  (Read 1052 times)

Hey, anyone remember that topic I posted about getting certain guns to reload automatically? Turns out, that there is a SUPER un-complicated way to do it. Especially with gravity cat's special weapons. Ya just go to the cs file of the gun you want to augment, look for the string of codes where you start seeing stuff about states, and look for this.

Code: [Select]
stateName[1] = "Ready";
  stateTransitionOnTriggerDown[1] = "Fire";
  stateAllowImageChange[1] = true;
  stateTransitionOnNoAmmo[1] = "Empty";

See where it says empty? Replace that with Reload. Boom. You're finished. Now BOTS can use the weapons too. Just wanted to post this because someone claimed it was tons of work. Said they'd have to re-do everything in the pack. Well, that ain't true.

Hm. This apparently works for any reloading weapon. Take the BF3 pack for example! It's exactly the same regarding the states!

that's only because the modder for both of your examples named the states that way. its not a catch all solution; I believe some bushi weapons dont work like that.

Sorta figured that. :( But to be honest, gcats special weapons and the BF3 pack are my favorite packs in terms of more realistic gunplay. They're the only ones I think were worth modding. The Blocklality pack is cool too, but I found out that although its fire animations look cooler and it has blood plumes on hit, it doesn't feel as refined as gcats weapons. It also uses the same reload scripts, but he already has it in there for bots to reload I think. It also doesn't work work with any of the Shooter_Playertype bots for some reason. Then there's the fact that it forces a playertype on you so that even players can't use one of the shooter playertypes unless they go in and remove that bit of code.

But yeah, I understand that it's not universal. Just wanted post this because someone...can't remember their name..told me it would be too much work. And it's not.


Sorta figured that. :( But to be honest, gcats special weapons and the BF3 pack are my favorite packs in terms of more realistic gunplay. They're the only ones I think were worth modding. The Blocklality pack is cool too, but I found out that although its fire animations look cooler and it has blood plumes on hit, it doesn't feel as refined as gcats weapons. It also uses the same reload scripts, but he already has it in there for bots to reload I think. It also doesn't work work with any of the Shooter_Playertype bots for some reason. Then there's the fact that it forces a playertype on you so that even players can't use one of the shooter playertypes unless they go in and remove that bit of code.

But yeah, I understand that it's not universal. Just wanted post this because someone...can't remember their name..told me it would be too much work. And it's not.
I don't know what it is about the realistic gun packs but they're always super buggy (reloading animations are horrible in blockland) or interfere with other stuff or have some really glitchy recoil.

I don't know what it is about the realistic gun packs but they're always super buggy (reloading animations are horrible in blockland) or interfere with other stuff or have some really glitchy recoil.

Yup! Only, with the Blockality pack, it's not a glitch. The guy coded it specifically to change your playertype when you equip a weapon. This  actually causes the glitch where the Shooter bots can't use them. I did some tests to prove that. Thankfully, I've NEVER had a problem with Gcat's weapons. That guy is probably programming games for some top-notch company right about now. Dude was crazy good with add-ons.

lol
blockality pack just doesn't use the .setMaxForward/Backward/Side/etcSpeed() functions, while GCat's either does or doesn't adjust player movement speeds at all. probably the latter.

Yup! Only, with the Blockality pack, it's not a glitch. The guy coded it specifically to change your playertype when you equip a weapon. This  actually causes the glitch where the Shooter bots can't use them. I did some tests to prove that. Thankfully, I've NEVER had a problem with Gcat's weapons. That guy is probably programming games for some top-notch company right about now. Dude was crazy good with add-ons.
well older weapons use datablock changing because the set move speed functions weren't even added until recently