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.

PowerWeaponLevel2 Issue with Morphs

Postby Evil Operative » Fri Oct 16, 2020 10:13 am

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.
User avatar
Evil Operative
Sᴇᴄᴛᴏʀ Cʟᴇᴀʀ...
Joined: 22 Mar 2015
Location: Inside a land where Walls and Decors are covered in Blood and Guts. (Brutal)
Discord: Ecl1p5e#8061

Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests