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

Unit Disguise Spell

Status
Not open for further replies.
Level 3
Joined
Apr 20, 2021
Messages
19
I made a unit called a Mercenary Informant that could Disguise himself as an enemy unit (with matching colors) visually that is controlled by the owner of the unit but shows up as a Neutral unit for the enemy (kind of like the Mechanical Critter). Problem is, I don't know how to create an Action that makes it so. The trigger below is a sample trigger that disguises the Mercenary Informant as an enemy Worker by replacing him with another unit that has identical stats, but with a different model.

  • Disguise
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Disguise
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Target unit of ability being cast)) Equal to Worker
        • Then - Actions
          • Unit - Replace (Triggering unit) with a Mercenary Informant (Worker) using The old unit's relative life and mana
          • Unit - Change color of (Triggering unit) to (Color of (Owner of (Target unit of ability being cast)))
          • Unit - Remove Disguise from (Last replaced unit)
        • Else - Actions
          • Do nothing

The morphing itself is flawless, apart from the color. Maybe it has something to do with how colors work in-game to avoid confusion, but this particular Action below doesn't change the Informant's color. He just retains his original color even as he morphs into the model of a worker.

  • Unit - Change color of (Triggering unit) to (Color of (Owner of (Target unit of ability being cast)))

As for the Mechanical Critter-like ability, I can't seem to figure out an Action that makes it so. Could anyone help me with this?
 
Level 3
Joined
Apr 20, 2021
Messages
19
Perhaps at this point:
  • Unit - Change color of (Triggering unit) to (Color of (Owner of (Target unit of ability being cast)))
there is no (Triggering unit), since you replaced it? Try the (Last replaced unit) instead of (Triggering unit).

Tried and done but sadly he's still red. Thank you for the reply!
UPDATE: It seems to work if I changed the action in a way that he changes into a specific color instead
 
Last edited:
Level 21
Joined
Mar 29, 2020
Messages
1,237
Hey, I ran into problems with a similar system. changing the color of units somehow gets entangled with the allied colors settings. try flipping through the allied color settings after the trigger that changes to the color of x player and see if afterwards you see the right colors.

In terms of making the unit appear neutral like a mechanical critter - check this out: Make specific unit not targetable via auto acquire but targetable via manual attack?
 
Status
Not open for further replies.
Top