I came across a weird problem recently with one of the maps I am working on. Some of the spawning units died unexpectedly without any obvious cause. I have managed to locate and replicate the problem, but it still doesn't make any sense to me.
So I hope someone else can explain to me why this trigger will kill the unit:
Trigger:
Events
Player - Player 1 (Red) Presses the Down Arrow key
Conditions
Actions
Player - Set the current research level of Upgrade to 1 for Player 1 (Red)
Unit - Create 1 Dummy for Player 1 (Red) at (Center of Region 000 <gen>) facing Default building facing degrees
Unit - Add Frostbolt (Spellbook) to (Last created unit)
The Upgrade in this example give 500 health per rank and stack up to 10 times.
From my understanding, this is what happens:
If a unit have any upgrade and a spellbook with a skill in it (at the same time), then the unit is killed.
This can be avoided if either the spellbook or the upgrade is removed, or if the trigger sequence is altered. But why is the unit killed in the first place?
See test map for more info.
So I hope someone else can explain to me why this trigger will kill the unit:
Trigger:
Events
Player - Player 1 (Red) Presses the Down Arrow key
Conditions
Actions
Player - Set the current research level of Upgrade to 1 for Player 1 (Red)
Unit - Create 1 Dummy for Player 1 (Red) at (Center of Region 000 <gen>) facing Default building facing degrees
Unit - Add Frostbolt (Spellbook) to (Last created unit)
The Upgrade in this example give 500 health per rank and stack up to 10 times.
From my understanding, this is what happens:
If a unit have any upgrade and a spellbook with a skill in it (at the same time), then the unit is killed.
This can be avoided if either the spellbook or the upgrade is removed, or if the trigger sequence is altered. But why is the unit killed in the first place?
See test map for more info.