Code: Select all
SetActorProperty(0, APROP_DAMAGE, 20);
The question is, how can I make that line of code to set the damage as a fixed value?
Thanks in advance.
Code: Select all
SetActorProperty(0, APROP_DAMAGE, 20);
Code: Select all
SetActorProperty(0, APROP_DAMAGE, 0x400000014);
Code: Select all
SetActorProperty(0, APROP_DAMAGE, 20);
Code: Select all
Damage value/(expression) = value/(expression result)
Code: Select all
Damage value/(expression) = value/(expression result) * random(1, 8)
A_VileAttack does 20 direct fixed damage + 70 radius damage.Nirvana wrote:Strange, because I have found with both A_BruisAttack and A_VileAttack that they use exact values (or at least did for me...I think) I know for sure A_VileAttack did, but it's a weird attack in and of itself.
A_BruisAttack seems to use fixed damage as well, you can set it directly.Blue Shadow wrote:I appreciate the input, guys, but here's a clarification:
What I'm trying to do here is to change a projectile's damage at runtime and I can do that by using SetActorProperty with APROP_DAMAGE. But the thing is I don't have the choice if I want the end damage to be a fixed value (no random).
A_VileAttack does 20 direct fixed damage + 70 radius damage.Nirvana wrote:Strange, because I have found with both A_BruisAttack and A_VileAttack that they use exact values (or at least did for me...I think) I know for sure A_VileAttack did, but it's a weird attack in and of itself.
Yes, I have knowledge of that.Ethril wrote:I'm not sure how helpful this will be for your ACS, but I'm fairly certain that the Damage DECORATE property can be "unrandomized" if you enclose it in parentheses.
That was my first thought, but then I realized that ACS is the way instead... why? Because I have a leveling-up system in mind with which the player's weapons get stronger a little bit each time he/she levels-up (one or two points each level). That's why that idea won't serve my purposes well because it isn't flexible enough.Ethril wrote:That aside, you could just make some copies of the projectile and have some A_JumpIfs to determine which one to use, instead of using only one and making it dynamic. Well, maybe; I don't really know what this is in context of.
Code: Select all
actor LVL2Damage : PowerDamage
{
damagefactor "normal", 1.1
inventory.icon "MEGAA0"
}
actor LVL2 : PowerupGiver
{
+Inventory.AutoActivate
Inventory.MaxAmount 0
Powerup.Type LVL2Damage
Powerup.Duration -2147483647
}
Although it isn't that flexible at least you don't have to do a copy of each projectile.DaMan wrote:May I suggest [wiki]PowerDamage[/wiki].That's an item that last 2years that increases damage by 10%. Replace with a stronger one for lvl3 rinse lather repeat.Code: Select all
actor LVL2Damage : PowerDamage { damagefactor "normal", 1.1 inventory.icon "MEGAA0" } actor LVL2 : PowerupGiver { +Inventory.AutoActivate Inventory.MaxAmount 0 Powerup.Type LVL2Damage Powerup.Duration -2147483647 }