Small question, seems silly to make a thread for it, but here we go:
So, I'm working on a map concept, and I was curious: With the ReducedDamagePct property of the Pawn class, is it possible to set this as Negative? That is, is it possible to give a pawn a Weakness to a particular damage type? (I was considering a Zone that restores health, but inflicts a weakness to a particular damage type upon players)
Negative ReducedDamagePct?
-
- Godlike
- Posts: 3774
- Joined: Fri Jan 14, 2011 1:53 pm
- Personal rank: -Retired-
Re: Negative ReducedDamagePct?
Yeah, you are going to need to set the pawn's reduced damage. I'd do it by awarding an armor inventory item that reduces certain damage types. That way you can fully control the player's possession of it and by extension the effects you want to accomplish. The player doesn't even need to be aware they have the armor-based item if you don't want to make it visual.
So long, and thanks for all the fish
Re: Negative ReducedDamagePct?
Well, I was thinking of just taking the approach that the VaccumZone does, but rather than changing the player's FOV, change their ReducedDamagePct and ReducedDamageType.
-
- Godlike
- Posts: 3774
- Joined: Fri Jan 14, 2011 1:53 pm
- Personal rank: -Retired-
Re: Negative ReducedDamagePct?
Altering a client-side variable is different than affecting something that replicates from server to client and back. It's going to be a bit more technical to do this than you are thinking. If you have a lava zone, it can directly damage the player and there's no issue. The server tells the client "You were hurt, your new health is X." and everything is fine. However if the server attempts to assign damage taken by a pawn but also needs to compare damage type and if that pawn is in a particular zone, that's a lot more complex. It's just way easier to assign an inventory item to the pawn when he is in your chosen zone, let that item affect takedamage, then destroy it if the pawn leaves the zone. Replication is preserved, the chain of mutator takedamage stays simple, and it will be easy to code since lots of examples exist.
It's very possible to do it your way but it's going to require multiple extra "if/then" checks on every bit of damage taken. Too much of a load for me to go that route.
It's very possible to do it your way but it's going to require multiple extra "if/then" checks on every bit of damage taken. Too much of a load for me to go that route.
So long, and thanks for all the fish