Page 1 of 1

Secondary fire gives 5 sec invulnerability?

PostPosted: Mon Sep 25, 2017 7:14 pm
by Reactor
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.

Re: Secondary fire gives 5 sec invulnerability?

PostPosted: Mon Sep 25, 2017 11:29 pm
by Nevander
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.

Re: Secondary fire gives 5 sec invulnerability?

PostPosted: Tue Sep 26, 2017 8:48 am
by ramon.dexter
Altfire state, and some A_JumpIf checks would do the trick. You can even use A_Print to directly print from decorate states.

Re: Secondary fire gives 5 sec invulnerability?

PostPosted: Tue Sep 26, 2017 12:52 pm
by Reactor
Very well. And the properties of said invulnerability can be set right there to met the conditions I mentioned?

Re: Secondary fire gives 5 sec invulnerability?

PostPosted: Wed Sep 27, 2017 12:06 am
by ramon.dexter
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.