Inventory reduce player damage

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
NachtIntellect
Forum Regular
Posts: 480
Joined: Mon Jun 11, 2012 9:20 am
Location: Bienenstock, Germany

Inventory reduce player damage

#1

Post by NachtIntellect » Thu Oct 02, 2014 12:45 pm

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.
Did you just bite me? Come here, I will bite you back bastard.

Watermelon
Zandrone
Posts: 1244
Joined: Thu Jun 28, 2012 9:07 pm
Location: Rwanda

RE: Inventory reduce player damage

#2

Post by Watermelon » Thu Oct 02, 2014 1:56 pm

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.

Lollipop
Zandrone
Posts: 1124
Joined: Tue Jul 24, 2012 10:34 am
Location: Denmark

RE: Inventory reduce player damage

#3

Post by Lollipop » Thu Oct 02, 2014 2:39 pm

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.
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there

User avatar
NachtIntellect
Forum Regular
Posts: 480
Joined: Mon Jun 11, 2012 9:20 am
Location: Bienenstock, Germany

RE: Inventory reduce player damage

#4

Post by NachtIntellect » Thu Oct 02, 2014 2:50 pm

Thankyou that's exactly what I needed and it works.
Did you just bite me? Come here, I will bite you back bastard.

Post Reply