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

Obsidian statues ability to upgrade to a destroyer

Status
Not open for further replies.
Level 9
Joined
Jun 10, 2013
Messages
473
okay I have made a custom ability based on the Obsidian statues ability to upgrade to a destroyer, the problem is should I select a group of two or more of my custom unit and use the upgrade ability, it only deducts the cost as for 1 unit but upgrades them all, so in away your kinda cheating. Not sure if theirs a fix to this but if there is I'd gladly like to hear it >:D
 
Level 25
Joined
Sep 26, 2009
Messages
2,381
If you based your ability on Channel spell, then in the options for the Channel spell tick "Unique" (I mean the list where you also tick "Visible"). What that does is that only the currently selected & highlighted unit will use the spell, not all selected units with this ability.
 
Level 21
Joined
Nov 4, 2013
Messages
2,017
You should trigger it then. Don't base it on the obsidian destroyer morph ability but on another ability like Battle Roar whose effects can be nullified.
Through triggers, you do this:

  • Cancel Transform
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Transform
    • Actions
      • Animation - Play (Triggering unit)'s morph animation
      • Set Caster = (Owner of (Triggering Unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Triggering unit)) Current gold) Less than (Needed gold)
        • Then - Actions
          • Unit - Order (Triggering unit) to Stop
          • Animation - Reset (Triggering unit)'s animation
          • Custom script: if GetLocalPlayer() == udg_Caster then
          • Sound - Play KnightNoGold1 <gen>
          • Custom script: endif
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Triggering unit)) Current lumber) Less than (Needed lumber)
        • Then - Actions
          • Unit - Order (Triggering unit) to Stop
          • Animation - Reset (Triggering unit)'s animation
          • Custom script: if GetLocalPlayer() == udg_Caster then
          • Sound - Play KnightNoLumber1 <gen>
          • Custom script: endif
        • Else - Actions
Assuming that the player is using the Human race, you set up this trigger. If the player will not have sufficient gold/lumber, only he will receive the sound "More gold/lumber is required". Notice that you'll have to type in the tooltip of the transform skill the cost.
Now it's time to trigger the ability itself. Let's say the cost is 250 gold and 100 lumber. Here it's how it would be:

  • Transform
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Transform
    • Actions
      • Player - Add -250 to (Owner of (Triggering unit)) Current gold
      • Player - Add -100 to (Owner of (Triggering unit)) Current lumber
      • Unit - Replace (Triggering unit) with a (Transformed Unit) using The new unit's max life and mana
Notice that I used by purpose the negative sign for adding the gold and lumber so that it is substracted and not added. This trigger also gives you the chance of applying a special effect during the morph ;)
 
Status
Not open for further replies.
Top