SnowCrow
New Member
- Reaction score
- 7
In my map I have upgrades for swords and armor. Before any upgrades they are wooden and at level 1 they are iron and so on. They are attachments on the units (loaded from The Hive). I attach them to the units through a trigger:
Does this cause problems? I heard that undestroyed special effects leak or something.
Another problem is that when I finish an upgrade, the previous attachments stay on the already trained units, but if I train a new unit, it has the new attachments. Is there a way to replace the old units' previous attachments with the new ones?
Or should I just forget about this and use 1 model? :f
Thanks in advance.
Code:
Sword Attach 01
Events
Unit - A unit owned by Player 1 (Red) Finishes training a unit
Conditions
(Unit-type of (Trained unit)) Equal to Swordsman
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current research level of Iron Swords for Player 1 (Red)) Equal to 0
Then - Actions
Special Effect - Create a special effect attached to the left hand of (Trained unit) using war3mapImported\Sword.mdx
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current research level of Iron Swords for Player 1 (Red)) Equal to 1
Then - Actions
Special Effect - Create a special effect attached to the left hand of (Trained unit) using war3mapImported\knight_broad_sword.MDX
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current research level of Iron Swords for Player 1 (Red)) Equal to 2
Then - Actions
Special Effect - Create a special effect attached to the left hand of (Trained unit) using war3mapImported\Beautiful sword model by DerReaper2.mdx
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current research level of Iron Swords for Player 1 (Red)) Equal to 3
Then - Actions
Special Effect - Create a special effect attached to the left hand of (Trained unit) using war3mapImported\Runed Longsword.mdx
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current research level of Iron Swords for Player 1 (Red)) Equal to 4
Then - Actions
Special Effect - Create a special effect attached to the left hand of (Trained unit) using war3mapImported\CrystalSwordNew.mdx
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current research level of Iron Swords for Player 1 (Red)) Equal to 5
Then - Actions
Special Effect - Create a special effect attached to the left hand of (Trained unit) using war3mapImported\DragonBlade.mdx
Else - Actions
Do nothing
Another problem is that when I finish an upgrade, the previous attachments stay on the already trained units, but if I train a new unit, it has the new attachments. Is there a way to replace the old units' previous attachments with the new ones?
Or should I just forget about this and use 1 model? :f
Thanks in advance.