How to turn off powerups through ACS?

Archive of the old editing forum
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.
User avatar
Nash
 
 
Posts: 17465
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

How to turn off powerups through ACS?

Post by Nash »

For cutscene purposes, I'd like to create a script that gives the player an automatically-activated TimeFreezer. Due to the semi-interactivity of the cutscene, a fix duration for the TimeFreezer is not ideal so I just gave it a very high duration and a looped script that constantly gives the TimeFreezer to the player so the freeze will never end if the player just leaves the game unattended.

When it times for the cutscene to end though, I don't know how to negate the TimeFreezer effect.

Is this possible? I get the feeling it is because I *think* I remember seeing WADs that use scripts to turn powerups like Berserk and Radiation Suit at will.
User avatar
Zippy
Posts: 3302
Joined: Wed Mar 23, 2005 5:31 pm
Location: New Jersey

Post by Zippy »

Just take the correct item out of the player's inventory. I'm not sure what the item for the time freeze would be.

Just to give an example though, the [wiki]Classes:InvulnerabilitySphere[/wiki] is a powerup giving pickup which will give the player an item of [wiki]Classes:PowerInvulnerable[/wiki]. If you wanted to cancel the invulnerability early, you would remove the PowerInvulnerable from the player's inventory.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Post by Matt »

Just remember to give the powerups back when the cutscene's done...
User avatar
Nash
 
 
Posts: 17465
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Post by Nash »

Well, I decided to scrap this entirely because the TimeFreezer doesn't cancel immediately. It still waits for the duration specified before things slowly start to move again.

Time to request an ACS feature...

Return to “Editing (Archive)”