Page 1 of 1

[ZScript] Weapon input shortcuts: no more Refire headaches!

Posted: Wed Oct 10, 2018 1:16 am
by Matt
Here's a guide that no one asked for, but hopefully can prove helpful to someone trying something that can easily turn into a not-exactly-flying spaghetti monster without sufficient planning.

Your weapon controls allow up to 8 buttons. This is quite a lot, but sometimes you want to accomplish things through specific combinations of buttons - without getting trapped in a maze of A_(Clear)Refire hacks trying to trace a unique path for every possibility.

Examples:
  • Dual-wield (or double-barreled, double-triggered) weapons: each of the two fire buttons handles one weapon, and each weapon (which is on a different overlay from the other, of course) can be fired totally independently of what the other is doing - even if the other fire button is still being held down.
  • Heavy Weapon Guy-style gun spinup: hold altfire to keep your gun ready to fire at any time.
  • Slam fire shotgun: hold trigger down, hold altfire to rack the shotgun, gun immediately goes off once you chamber the new round.
  • Panic shot: shoot in the middle of a reload sequence, spending whatever happens to be in the chamber already.
  • Check for holding Zoom/Reload/other non-A_Refire-able inputs outside of a ready state.
  • Daggerfall-style melee weapons: hold button, move mouse in the direction to swing.
  • Wacky weapon with a "jamming typewriter" interface that prevents the weapon from operating if you mash the buttons too fast.
  • Spellcasting decision trees.
  • Crude musical instruments.
  • You have actually run out of buttons for calling all the various weapon functions you have coded.
I've developed some shortcuts that massively improve my own quality of life while trying to do stuff like this. It occurs to me that my setup is not self-evident and might be good to share.

Spoiler:

EDIT: Example of how this looks in application:
Spoiler:

Re: [ZScript] Cheating with weapons

Posted: Wed Oct 10, 2018 4:37 am
by Nash
Thanks for these timesavers.