• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

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

Status
Not open for further replies.
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.
 
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.
Back
Top