• 🏆 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!

[Solved] Triggering a unit with 2 abilities

Status
Not open for further replies.
Level 1
Joined
Nov 13, 2016
Messages
2
Hello, I'm new here so I'll try to be as simple as I can. I am trying to create units that you have to upgrade individually and for the peasant, I have 2 different abilities. One to upgrade to a Miner and another to a Woodsman. I have the abilities as a charge gold/lumber so the owner has to pay for the upgrade, but when I go to apply the trigger to replace the unit after it is purchased it only sticks with one upgrade. So to lay it out.

Units:
Peasant (Upgrade to)
-Miner
-Woodsman

Trigger
Event = Unit - a unit starts the effect of an ability.
Conditions = (Ability being cast) equal to Miner Upgrade (This is the charge gold/lumber ability)
Actions = Unit - replace (triggering unit) with a Miner using The old unit's relative life and mana.

I have the same trigger for the Woodsman and the two seem to get conflicted and goes only to the Miner even though I click the Woodsman Upgrade.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
To combine both of the above statements:

Abilities have an identifier that they send through by casting.
With almost every ability, it is impossible to change this identifier, so having multiple abilities based of the same standard ability will result in a collision and cause both abilities to be activated and have some other side effects.

Channel and Charge Gold and Lumber are the only 2 (that I know of) abilities that can change their identifier.
It is named the "Base Order Id" and is an order string.

You should change that Base Order Id so the abilities are different from each other.

(On a side note, maybe you should try to make the units upgrade with the native upgrade mechanic.
The same as the human/undead towers use or any town hall.)
 
Level 1
Joined
Nov 13, 2016
Messages
2
To combine both of the above statements:

Abilities have an identifier that they send through by casting.
With almost every ability, it is impossible to change this identifier, so having multiple abilities based of the same standard ability will result in a collision and cause both abilities to be activated and have some other side effects.

Channel and Charge Gold and Lumber are the only 2 (that I know of) abilities that can change their identifier.
It is named the "Base Order Id" and is an order string.

You should change that Base Order Id so the abilities are different from each other.

(On a side note, maybe you should try to make the units upgrade with the native upgrade mechanic.
The same as the human/undead towers use or any town hall.)

Thanks! This was the problem.
 
Status
Not open for further replies.
Top