I create starting armor which give very little protections, but "repair" itself.
But after completely destroing such armor, and when it repair itself back, it stop allow any protections. This happens only with armor.savepercent and only if armor was depleted by attack, not taken from console.
Summon monya. Use only with budda cheats.
Armor dont protect after "repairing"
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!)
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!)
-
- Posts: 1606
- Joined: Mon Jun 12, 2017 12:57 am
Armor dont protect after "repairing"
You do not have the required permissions to view the files attached to this post.
-
- Lead GZDoom+Raze Developer
- Posts: 49211
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Armor dont protect after "repairing"
Moving to the "scripting" forum.
-
- Posts: 1606
- Joined: Mon Jun 12, 2017 12:57 am
Re: Armor dont protect after "repairing"
I didnt express myself well. This definitely a bug.
Because after depleting, and adding to this depleted armor some numbers of "durability" in way
armor dont work properly, if it using armor.savepercent property. It still exist in inventory, can be increased with armor bonus, but it dont absorb any damage.
Because after depleting, and adding to this depleted armor some numbers of "durability" in way
Code: Select all
let first = Owner.FindInventory("BasicArmor", true); console.printf("assigned");
if (first != null)
{
let armor = BasicArmor(first); console.printf("found");
if (armor != null)
{
armor.amount += 1; console.printf("add");
}
}
armor dont work properly, if it using armor.savepercent property. It still exist in inventory, can be increased with armor bonus, but it dont absorb any damage.
-
- Posts: 86
- Joined: Tue Dec 27, 2016 4:08 am
Re: Armor dont protect after "repairing"
If I understand this correctly, depleted armor does not have any SavePercent. You are just adding to the amount but fail to validate the SavePercent setting. If you pick up some armor bonus while the armor has been depleted it will completely reinitialize the BasicArmor. You should do the same.
-
- Posts: 1606
- Joined: Mon Jun 12, 2017 12:57 am
Re: Armor dont protect after "repairing"
But it work if armor use armor.maxfullabsorb, or how there name?
-
- Lead GZDoom+Raze Developer
- Posts: 49211
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Armor dont protect after "repairing"
Sorry, it looks like my initial response got lost somehow.
I moved this to "Editing" because this isn't a bug. You are not supposed to manipulate the BasicArmor item yourself, the expected mode of operation is that it gets replenished by BasicArmorPickup and BasicArmorBonus items.
I moved this to "Editing" because this isn't a bug. You are not supposed to manipulate the BasicArmor item yourself, the expected mode of operation is that it gets replenished by BasicArmorPickup and BasicArmorBonus items.