[ZSCRIPT] Cleaning up the railgun, but how?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
yum13241
Posts: 781
Joined: Mon May 10, 2021 8:08 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): EndeavorOS (basically Arch)
Graphics Processor: Intel with Vulkan/Metal Support
Contact:

[ZSCRIPT] Cleaning up the railgun, but how?

Post by yum13241 »

FYI: I'm making an ZScript addon for my DECORATE mod.

ZScript Railgun (I replace the DECORATE one with MAPINFO, replaces Railgun doesn't work)
Spoiler:

DECORATE version (in main mod)
Spoiler:

First of all, I want to get rid of the A_JumpIfInventory HACKS, so I can have more railgun modes at ease. I know variables exist in ZScript, but how would I use them? I know I have to check for them using If but how would I go around doing that?

Second of all, I'd love to use A_WeaponOffset instead of Offset, which is simple enough, but if I use additive coordinates and calculate the difference* then it looks super bad.


Addendum:
Spoiler:
Post Reply

Return to “Scripting”