Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Meatbag

Multiplying damage by items?

Recommended Posts

Hello, I wish to make an Weapon to have it's damage multiplied by the amount of a certain item, for instance, If i have 100 Health, it's damage will be 2 x Health.

Some help?

Share this post


Link to post
Meatbag said:

Hello, I wish to make an Weapon to have it's damage multiplied by the amount of a certain item, for instance, If i have 100 Health, it's damage will be 2 x Health.

Some help?


Are you doing this from the Doom Source Code or the source of a source port? Or are you trying to do this with some definition format such as EDF, DECORATE, etc.?

If you are doing the former (editing the source code of the engine) it is actually quite easy.

Share this post


Link to post
GhostlyDeath said:

Are you doing this from the Doom Source Code or the source of a source port? Or are you trying to do this with some definition format such as EDF, DECORATE, etc.?

If you are doing the former (editing the source code of the engine) it is actually quite easy.


I am trying to do this through DECORATE, Is it possible?

Share this post


Link to post

It should be possible to do what you described above with DECORATE. ZDoom's custom attack codepointers should let you use an expression for the damage parameter that factors in the player's health, though I'm not sure if it'll be enough to just use the "health" variable in the expression, or if you'll need to check the player health through ACS.

If you haven't already, you might want to check out these pages:

http://zdoom.org/wiki/DECORATE_expressions
http://zdoom.org/wiki/Action_functions#Weapon_attack_functions

Edit: I just got frisky and confirmed that the "health" variable refers to player health when used in weapon attack codepointers, so you shouldn't need to touch ACS.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×