• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Is it possible to add alternate models for units/heroes?

Status
Not open for further replies.
Level 2
Joined
Oct 15, 2013
Messages
13
For example, would it be possible to have a paladin spawn using Uther's reforged model without replacing the normal paladin model or creating a new unit with that model.
 
Level 26
Joined
Sep 26, 2009
Messages
2,423
I think you have two options, really:
1. The model itself contains multiple models:
This approach is used for example by Druid of the Talon unit where a single model has the night elf version and the crow version, but this approach can make the model itself very big with lots of unused models.

2. Use trigger action:
  • Unit - Set Unit Skin of (Triggering unit) to 'Hamg'
This will change the visual part of a unit to another unit. The argument here is unit-type Id ('Hamg' is the unit type id for human archmage hero). That also means that the unit you want to change into must be defined in Object Editor.
You should be aware that the action not only changes the model/skin, but also other things like unit's sound set, etc. to that of the targeted unit-type.

Also, the value 'Hamg' is actually an integer number (it's unit type id, not unit type), but with a bit of custom script you can make it work:
Create two variables: UnitType (type: unit-type), UnitTypeId (type: integer), then run the folowing:
  • Actions
    • Set VariableSet UnitType = Paladin
    • Custom script: set udg_UnitTypeId = udg_UnitType
    • Unit - Set Unit Skin of (Triggering unit) to UnitTypeId
 
Level 16
Joined
Aug 20, 2009
Messages
1,552
I'm not familiar with new reforged natives, but wasn't there something like spawn unit with skin?
I took a peek and there is even hero skin on Object Editor. Though I admit I don't know anything about it yet and would like to know.

Following for knowledge!
 
Status
Not open for further replies.
Top