• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Need help to understand a strange death interaction

Status
Not open for further replies.
Level 2
Joined
May 2, 2019
Messages
6
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.
 

Attachments

  • Warcraft III - Strange Death Interaction.w3x
    19.6 KB · Views: 18
Level 2
Joined
May 2, 2019
Messages
6
Ah, the infamous spell-book upgrade bug. This bug occurs if the bonus hp granted to the unit is greater than or equal to the unit's max hp.

If I recall, there is a thread by DracoL1ch in the Lab that addresses the probable cause behind the bug.

Thanks a lot! :D

I will try to find the thread and check it out.
 
Status
Not open for further replies.
Top