†ALPHA†
New Member
- Reaction score
- 3
I have a custom lumber mill model that's missing a proper work animation. I already tried transferring the original human lumber mill work anim but that didn't work. So I tried a group of triggers. Unfortunately because the triggers are rather inefficient the removal of the effect doesn't always work since the work anim isn't always the "last created effect"
Could you give me any help on how to make these triggers into one, efficient trigger?
-EDIT-
I added variables in order to store the special effect. This prevents these triggers from interfering from other effects but if I happen to have TWO lumber mills...
Could you give me any help on how to make these triggers into one, efficient trigger?
Code:
LumberMillUpgradeBegin
Events
Unit - A unit Begins research
Conditions
(Unit-type of (Triggering unit)) Equal to Lumber Mill
Actions
Special Effect - Create a special effect attached to the first large of (Triggering unit) using Abilities\Spells\Items\HealingSalve\HealingSalveTarget.mdl
Code:
LumberMillUpgradeFinish
Events
Unit - A unit Finishes research
Conditions
(Unit-type of (Triggering unit)) Equal to Lumber Mill
Actions
Special Effect - Destroy (Last created special effect)
Code:
LumberMillUpgradeCancel
Events
Unit - A unit Cancels research
Conditions
(Unit-type of (Triggering unit)) Equal to Lumber Mill
Actions
Special Effect - Destroy (Last created special effect)
-EDIT-
I added variables in order to store the special effect. This prevents these triggers from interfering from other effects but if I happen to have TWO lumber mills...
Code:
Set LumberUpgrade = (Last created special effect) //appended to end of LumberMillUpgradeBegin
Special Effect - Destroy LumberUpgrade //replaces last line in LumberMillUpgradeFinish and LumberMillUpgradeCancel