Code: Select all
Damage (#DamageIncrease)*10
Code: Select all
Damage (#DamageIncrease)*10
So I didn't need Zscript for this, and could have done this directly from decorate?Ryan Cordell wrote:You could probably plop in CountInv if you want it to be based off inventory item quantity.
I have a weapon that increases the the the player's inventory by 1 "DamageMult" item every time you hit something. The idea is to have the weapon do more damage the more hits you make, but you lose all of this charge when you take damage.Raziel236 wrote:What's your idea with this?
If pre-zscript Damage (/DamageFunction) could support using CountInv, then sure. Otherwise..Amuscaria wrote:So I didn't need Zscript for this, and could have done this directly from decorate?
You actually can do this in DECORATE by performing inventory state jumps that go to different damage functions.Ryan Cordell wrote:If pre-zscript Damage (/DamageFunction) could support using CountInv, then sure. Otherwise..Amuscaria wrote:So I didn't need Zscript for this, and could have done this directly from decorate?
This is how I'm currently doing it, but its impractical if I do it for more than a few states. I'm looking for something that is more dynamic that won't require me to redo the entire set of states each time I change the weapon's behavior.jdagenet wrote:You actually can do this in DECORATE by performing inventory state jumps that go to different damage functions.Ryan Cordell wrote:If pre-zscript Damage (/DamageFunction) could support using CountInv, then sure. Otherwise..Amuscaria wrote:So I didn't need Zscript for this, and could have done this directly from decorate?
That stupid, pointless amount of code bloating is exactly what he's trying to avoid.jdagenet wrote:You actually can do this in DECORATE by performing inventory state jumps that go to different damage functions.
Neat! I'll give this a try. Much thanks!Vaecrius wrote:in Decorate, I would add a user_dmg uservar, define damage as damage(user_dmg), and add the countinv to the user_dmg before it's needed.
if the actor is a hitscan coming from a shooter, just add countinv to the damage parameter in whatever you're using to call the hitscan attack.