How use flags in ModifyDamage and Zscript??

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
SubiluBR
Posts: 5
Joined: Fri Jan 28, 2022 4:57 pm
Graphics Processor: Not Listed

How use flags in ModifyDamage and Zscript??

Post by SubiluBR »

How i make to DrainLife damage ignore armor? How active/desactive Flag DMG_NO_ARMOR?

Code: Select all

override void ModifyDamage(int damage, Name damageType, out int newdamage, bool passive, Actor inflictor, Actor source, Int flags)
{
if (damageType == 'DrainLife')
{
newdamage = 5;
}
}

Return to “Scripting”