Meatbag Posted September 23, 2011 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? 0 Share this post Link to post
RestlessRodent Posted September 24, 2011 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. 0 Share this post Link to post
Meatbag Posted September 24, 2011 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? 0 Share this post Link to post
Mithran Denizen Posted September 24, 2011 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. 0 Share this post Link to post