[fixed] Tome of Power effects remain when level completed
Posted: Sun Apr 30, 2006 20:47
I'm working on a weapon mod for Heretic, and one of the things I've done is replace the Tome of Power with an instant-use version. Using this code:
I pick up the QuadDamage powerup and exit the level. When I enter the next level, the screen is not dimmed anymore, and there is no powerup timer - however, shooting whatever weapon I had out would fire the Tomed version instead of the normal version. That is, until I change weapons or do something that makes me switch weapons (i.e. pick up a new weapon or run out of ammo).
I propose a solution: if the current weapon is flagged as POWERED_UP, force the player to switch to its SisterWeapon upon changing levels and remove the powerup from their inventory.
Code: Select all
ACTOR QuadDamage : PowerupGiver 86
{
+INVENTORY.ALWAYSPICKUP
+INVENTORY.AUTOACTIVATE
+COUNTITEM
scale 0.8
Inventory.MaxAmount 0
Inventory.PickupSound "items/quaddamage"
Inventory.PickupMessage "quad damage!"
powerup.color "44 55 aa" 25
powerup.duration 2100
powerup.type "WeaponLevel2"
states
{
Spawn:
PQUA ABCDEFGH 3 BRIGHT
Loop
}
}
I propose a solution: if the current weapon is flagged as POWERED_UP, force the player to switch to its SisterWeapon upon changing levels and remove the powerup from their inventory.