• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Possible to change a unit's model mid-game?

Status
Not open for further replies.
Level 7
Joined
Mar 16, 2014
Messages
169
The only way I know of how to do this is transformations. You can add and remove bear form with the unit you want to revert to and from in the fields of the ability, but I don't want to make an equivalent ability for this for every unit in the game. I want to turn every unit into one specific model on command. I basically want Hex that doesn't silence the target.
 
Level 30
Joined
Feb 18, 2014
Messages
3,623
Not possible at the time being. The best you can do for now is to create multiple versions of the unit with different models and use triggers to replace them.
Also, what do you mean by "Hex doesn't silence the target"?
 
Level 4
Joined
Nov 13, 2019
Messages
47
Here's how I would do it.

  • Transform Ability
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to DummyAbility
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Picked unit)) Equal to Footman)) and do (Actions)
        • Loop - Actions
          • Set VariableSet UnitPoint = (Position of (Picked unit))
          • Unit - Remove (Picked unit) from the game
          • Unit - Create 1.Grunt for Player 1 (Red) at UnitPoint facing (Facing of (Picked unit)) degrees
You might also need a variable for storing the facing angle of the removed unit before its removed.
With a few extra steps you can do stuff like keep the same amount of hp and mana on the new unit as the old one if you need to..
 
Status
Not open for further replies.
Top