This ought to be rather simple, maybe some mods already has it. One of the weapons we thought up would give the player 5 seconds of invulnerability, and would cost 20 units of ammo. The invulnerability itself would be akin to the Doom one, except the screen would simply turn black and white, and NOT negative. This secondary fire-invulnerability could NOT be accumulated (so if the player activates it 3 times, he will not gain 15 seconds of invincibility), and of course, it would not activate if the player has less than 20 units of ammo loaded within the gun. This feature would be great, now players can't whine about "duuuuuuuuuu there R too few invulnerability artifactz, da game iz too hard!!!1!!11!1ONEONEONEELEVEN!"
Needless to say, this invulnerability is useless against bottomless pits, chaos device projectile hit, falling out in space, running out of time, or failing a mission objective.
Secondary fire gives 5 sec invulnerability?
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.
-
- Posts: 2091
- Joined: Thu Feb 03, 2011 6:39 pm
- Location: Island's Beauty, Hungary
-
- Posts: 2254
- Joined: Mon Jan 06, 2014 11:32 pm
Re: Secondary fire gives 5 sec invulnerability?
You could do an altfire state which gives the player a powerup item with a 5 second duration that grants invulnerability, and make it so you can only use one at a time and the ammo use of the alt fire is 20.
-
- Posts: 1558
- Joined: Tue Oct 20, 2015 12:50 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Kozolupy, Bohemia
Re: Secondary fire gives 5 sec invulnerability?
Altfire state, and some A_JumpIf checks would do the trick. You can even use A_Print to directly print from decorate states.
-
- Posts: 2091
- Joined: Thu Feb 03, 2011 6:39 pm
- Location: Island's Beauty, Hungary
Re: Secondary fire gives 5 sec invulnerability?
Very well. And the properties of said invulnerability can be set right there to met the conditions I mentioned?
-
- Posts: 1558
- Joined: Tue Oct 20, 2015 12:50 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Kozolupy, Bohemia
Re: Secondary fire gives 5 sec invulnerability?
As I said, you dould do a JumpIf check, make a dummy invisible token item and check for that item. Basically, thats how variables work in decorate - you have to make a item, that acts as a variable.