if or eq damaging_type 0 eq damaging_type 1 eq damaging_type 2 eq damaging_type 3 eq damaging_type 6;
return power part side;
else or eq damaging_type 7 eq damaging_type 8 eq damaging_type 9 eq damaging_type 10 eq damaging_type 11;
return power part side;
else or eq damaging_type 15 eq damaging_type 16 eq damaging_type 17;
return power part side;
Any damage type that's placed in one of these lines returns from the script function before it has a chance to apply the shields. The reason to have them split across multiple lines like this is that the script engine can only accept so many arguments in the if statement before being overloaded.
For a moment I interpreted this as an object that blocks projectiles but not unit movement, like a forcefield/shield membrane.
damageType: 1
damageAlter:
ResistType: 2
Which tipe of damage will use shield script?
One more question:There is only one damage type, and it is `ResistType`. `damageType` exists only for backward compatibility and for default values for `damageAlter`.
If we use two damage types in item rule, like this:Code: [Select]damageType: 1
Which tipe of damage will use shield script?
damageAlter:
ResistType: 2
items:
- type: STR_ROUND_SHIELD
categories: [STR_HAND_SHIELD]
size: 0.3
weight: 10
costSell: 14000
bigSprite: 1100
floorSprite: 1100
handSprite: 1572
#! meleeHitSound: 79
meleeAnimation: 0
power: 0
damageType: 6
damageBonus:
strength: 0.1
damageAlter:
RandomType: 2
FixRadius: 0
IgnoreDirection: false
ArmorEffectiveness: 1.5
ToHealth: 0.2
accuracyMelee: 85
meleeMultiplier:
melee: 0.5
bravery: 0.4
costMelee:
time: 9
energy: 7
costThrow:
energy: 10
time: 20
flatThrow:
time: true
flatRate: true
battleType: 3
clipSize: -1
invWidth: 2
invHeight: 2
tags:
PHYSICAL_SHIELD_ARMOR: 1
ITEM_SHIELD_BLOCK_MELEE_COEFFICIENT: 35
ITEM_ENERGY_SHIELD_CAPACITY: 300
ITEM_ENERGY_SHIELD_PER_TURN: 0
ITEM_ENERGY_SHIELD_TYPE: 1
ITEM_ENERGY_SHIELD_FLASH_COLOR: 5
ITEM_ENERGY_SHIELD_INDICATOR_COLOR: 2
ITEM_ENERGY_SHIELD_COLOR_REPLACED_BY_INDICATOR: 2
ITEM_ENERGY_SHIELD_DOWN_COLOR: 15
ITEM_ENERGY_SHIELD_NEEDS_PRIMING: 0
That's because AI doesn't like putting anything but weapons in their hands, and it has to be in their hands in order to work. It's best to just put it on a unit's armor.You dont understand. I put this item in hands of my units. And then shoot them. And shield does not absorb damage.
AI units can hold one melee weapon and one ranged weapon.Good idea. Must remember.
What I am planning tobut do (but haven't done yet) is creating two types of shields, one being a melee weapon, the other a ranged weapon (but with no actual range).
The melee shield is to be used with a ranged weapon, and vice versa.