How do I make it so that when you collect a power up item (like Berserk, Light Amplification Goggles, etc.) you can have that power forever until you complete a level? I would like to make a Berserk only WAD, but I would like to have the power up active forever so that the player doesn't need to collect more berserk power ups. What do I need to input in scripts?
Thanks a bunch!
How do I activate Infinite Items in script?
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- TheSoldiersShadow
- Posts: 35
- Joined: Wed Apr 06, 2016 4:29 pm
- Location: Canada
- Tapwave
- Posts: 2096
- Joined: Sat Aug 20, 2011 8:54 am
- Preferred Pronouns: No Preference
- Graphics Processor: nVidia with Vulkan support
Re: How do I activate Infinite Items in script?
Since Berserk lasts for the entire level, you can make an ENTER script that gives the player(s) Berserk. It should activate at the beginning of each level if you put it in an ACS library.
- Arctangent
- Posts: 1235
- Joined: Thu Nov 06, 2014 1:53 pm
- Contact:
Re: How do I activate Infinite Items in script?
You put a Berserk pack in the level where the player can collect it.
Congratulations, you've now made the player do x10 punch damage for the rest of the level! Best part about this trick? It's 100% vanilla compatible, to boot.
Congratulations, you've now made the player do x10 punch damage for the rest of the level! Best part about this trick? It's 100% vanilla compatible, to boot.
- Kizoky
- Posts: 291
- Joined: Mon Nov 14, 2011 9:59 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: Around weirdos, I'm the biggest weirdo among them
- Contact:
Re: How do I activate Infinite Items in script?
This should do the trick.
Maybe doing the duration thing to Berserk doesn't really help, but you can use that Duration "hack" on other powerups
Maybe doing the duration thing to Berserk doesn't really help, but you can use that Duration "hack" on other powerups
Code: Select all
ACTOR CustomBerserk : CustomInventory
{
+COUNTITEM
+INVENTORY.ALWAYSPICKUP
Inventory.PickupMessage "$GOTBERSERK" // "Berserk!"
Inventory.PickupSound "misc/p_pkup"
Powerup.Duration 0x7FFFFFFF
States
{
Spawn:
PSTR A -1
Stop
Pickup:
TNT1 A 0 A_GiveInventory("PowerStrength")
TNT1 A 0 HealThing(100, 0)
TNT1 A 0 A_SelectWeapon("Fist")
Stop
}
}
Re: How do I activate Infinite Items in script?
Indeed, because that's already Berserk's standard default normal vanilla unmodified original duration.KiLerZolika wrote:Maybe doing the duration thing to Berserk doesn't really help