On my upcoming project, the main focus is on magic powers which are powerups or custom projectiles based mainly on elements.
One of the Wind spells in particular (and the whole reason of the thread) grants the player the ability to fly for 10 seconds, and for that to work it gives the player a custom Artifly/Wings of Wrath powerup. Works flawlessly on Heretic and Doom! In Hexen, however, things start to get tough.
It seems PowerFlight/Artifly/Wings of Wrath is hardcoded in Hexen, and once the player casts the spell, the power lasts for a undefined amount of time, even in levels within the same HUB. I've tried to mess with "Inventory.HubMaxAmount", "INVENTORY.INTERHUBSTRIP", Max.Amount and a bunch of flags and properties, but no success. In this thread, user Arctangent suggests that it should be done in ZScript, and i agree that's the easiest way, but i don't want to exclude Zandronum players just yet. I want to see if there's at least a hacky way to get through.
There are three ways to remove the powerup:
1 - Open the console or kill yourself, then resurrect (we obviously don't want this one).
2 - Open the console and type "Fly", then "Fly" again. This unleashes a series of bugs. The WoW icon stops spinning, the Powerup.Color won't fade away, and you can't use other flying powerups. (Obviously we don't want this one too).
3 - Open the console and type "take powerflight". This one seems to work well!
So, would there be a way (with ACS) to "detect" if the player has either a PowerFlight on or, a specific inventory item as a token, count 10 seconds and remove the Power.Flight from the inventory completely? My ACS skills are limited to Booleans, and ends in there.
Just in case somebody wants to see the powerup, here it is:
Code: Select all
ACTOR RDWindPower3 : Artifly
{
Game Heretic
-INVENTORY.HUBPOWER
-INVENTORY.INTERHUBSTRIP
+INVENTORY.AUTOACTIVATE
-INVENTORY.PERSISTENTPOWER
+INVENTORY.FANCYPICKUPSOUND
Inventory.MaxAmount 0
Inventory.InterHubAmount 0
Inventory.Icon "TNT1A0"
Powerup.Color Green 0.05
Powerup.Duration -10
Tag "Caelipteryx"
}
EDIT: Forgot to mention i am using GZDoom 3.2 and i already tried InfiniteFlightPowerup on MAPINFO, thanks to Rip And Tear for the reminder.