Page 1 of 1
Inventory reduce player damage
Posted: Thu Oct 02, 2014 12:45 pm
by NachtIntellect
Hey everyone I was wondering how I would go about this alright so an item is in a players inventory what I want to do is if this item is in the players inventory, I want to reduce the damage given to the player such as Melee damage.
RE: Inventory reduce player damage
Posted: Thu Oct 02, 2014 1:56 pm
by Watermelon
I think you might be able to create some kind of Power<Something> that gives a DamageFactor reduction in the terms of an DamageType, assuming you've attached a DamageType to the melee attack.
Sorry I haven't done this in so long I don't remember much... but hopefully that points you in the right direction and someone more familiar with this area can give you a more complete answer.
RE: Inventory reduce player damage
Posted: Thu Oct 02, 2014 2:39 pm
by Lollipop
I think this is what you need.
http://zdoom.org/wiki/Classes:PowerProtection
You can use 0x7FFFFFF as the duration for a near-infinite duration powwerup.
RE: Inventory reduce player damage
Posted: Thu Oct 02, 2014 2:50 pm
by NachtIntellect
Thankyou that's exactly what I needed and it works.