• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Special effects "permanently"

Status
Not open for further replies.
Level 7
Joined
May 30, 2018
Messages
290
Hey hey guys,

I made following trigger

  • AbilityAnimations
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • (Researched tech-type) Equal to Ignited Ammunition
    • Actions
      • Unit Group - Pick every unit in (Units of type Mortar Team) and do (Special Effect - Create a special effect attached to the weapon of (Picked unit) using Abilities\Spells\Human\FlameStrike\FlameStrikeDamageTarget.mdl)
The problem is the special effect only gets attached to models, that are already trained (are present in the game) but future units of that type that get produced don't have this effect attached. How can I make it so units that will be trained in the future also get this special effect attached.
 
Level 29
Joined
Feb 18, 2014
Messages
3,584
You could detect when that unit type finishes training then add the special effect to it. Now as for the upgrade, I am not sure if it's possible to detect if an upgrade is already researched but you could use a boolean to check if the upgrade is complete then do what I said above. Here's an example :

A unit Finishes research

Researched tech-type Equal to Ignited Ammunition

Set VariableSet UpgradeDone = True

--------------------

A unit Finishes training

Unit-type of (Trained unit) Equal to "SomeUnit"
UpgradeDone Equal to True

Add Special effect to trained unit...
 
Level 7
Joined
May 30, 2018
Messages
290
You could detect when that unit type finishes training then add the special effect to it. Now as for the upgrade, I am not sure if it's possible to detect if an upgrade is already researched but you could use a boolean to check if the upgrade is complete then do what I said above. Here's an example :

A unit Finishes research

Researched tech-type Equal to Ignited Ammunition

Set VariableSet UpgradeDone = True

--------------------

A unit Finishes training

Unit-type of (Trained unit) Equal to "SomeUnit"
UpgradeDone Equal to True

Add Special effect to trained unit...


Thanks, works perfectly :)!
 
Level 40
Joined
Feb 27, 2007
Messages
5,124
This way also leaks effects and they can persist after death. There is a much easier way. The ability ‘sphere’ that the Bloodmage has just attached a special effect to a specific attachment point of a unit. Make a copy of this ability that bestows the effect you want and give it the techtree requirement of the upgrade. Give this ability to the mortar teams and it should automatically be activated when the upgrade is researched.
 
Status
Not open for further replies.
Top