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.
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.
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?
-
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
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
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?