PowerWeaponLevel2 Issue with Morphs

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
User avatar
Evil Operative
Posts: 61
Joined: Sat Mar 21, 2015 10:44 pm

PowerWeaponLevel2 Issue with Morphs

Post by Evil Operative »

So, I'm trying to make a scenario where the player is given the ability to perform "upgrades" using morphs after certain conditions are met. Everything has been fine until now, that I am trying to make a new kind of custom powerup using the Tome of Power effect (PowerWeaponLevel2) with Decorate wherein there are some attacks that afflict the target with "half firing speed", an inverse situation from PowerDoubleFiringSpeed where the tics on your weapon are doubled instead of halved, so the weapon functions at half speed.

I have made exact replicas of the regular weapon, but doubled all the tics in the firing states to achieve the desired effect, and have also successfully linked both the versions of the weapons with Weapon.SisterWeapon. The problem lies herein, where getting the powerup while unmorphed (or being at your base level upgrade) the weapon changes to the half firing speed counterpart, and reverts back all the same when the powerup runs out.

But, when you morph even once, the powerup starts behaving differently wherein the weapon powers up successfully, but it gets stuck in its powered up state permanenently until you morph again, thus getting another weapon. Of course I could just do normal state skips with inventory checks, but I am curious as to whether I could make this scenario work first.
Post Reply

Return to “Scripting”