How to retrieve Unit model path?

kissmenow21

New Member
Reaction score
0
Hi, I'm making a map where a unit can mount (be transported by a zepplin)
and that will make an attachment of the loaded model to the chest of the transport(zepplin) so that the unit will look like it's riding on top of it.
I know I can make an ability and giving it the model path and stuff.
But I wanted to generalize it over all models of my hero set so I don't end up with 100 scripts or 100 if statements.
In other words, I would like to do

Special Effects - Create a special effect attached to the chest of (Transporting unit) using (Art path of Acid Bomb Effect Art(index 0))

Except I want the art path to be one for A unit. Not an ability.
I searched for it and I couldn't find one that retrieves unit's art path.
Can someone help?

It'd be very appreciated.
 

Bogrim

y hello thar
Reaction score
154
I don't know a terribly about modelling, but as far as I know, you cannot attach unit models to other units as special effects. It just doesn't work.
 

Guest3z

New Member
Reaction score
22
Trigger:
  • Test
    • Events
      • Player - Player 1 (Red) types a chat message containing Test as An exact match
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Race of YourUnit) Equal to Human
        • Then - Actions
          • Set String = units\human\
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Race of YourUnit) Equal to Orc
            • Then - Actions
              • Set String = units\orc\
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Race of YourUnit) Equal to Undead
                • Then - Actions
                  • Set String = units\undead\
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Race of YourUnit) Equal to Night Elf
                    • Then - Actions
                      • Set String = units\nightelf\
                    • Else - Actions
      • Set String = (String + ((String((Unit-type of YourUnit))) + (\ + ((String((Unit-type of YourUnit))) + .mdl))))
      • Special Effect - Create a special effect attached to the chest of Villager (Male 2) 0000 <gen> using String


Tested this and it seems to work. Just set the special effect to String and your unit in YourUnit. Hope this helps :thup:
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top