• 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.

[General] How to use tree as unit?

Status
Not open for further replies.
Level 11
Joined
Oct 9, 2015
Messages
721
I just tested and it works, DSG, you need to set the pathing texture of the destructible you're going to use for the reflection of the unit to NONE, then use this function:
  • Unit Group - Pick every unit in (Units of type Unit Tree) and do (Actions)
    • Loop - Actions
      • Set TempPointTexture = (Position of (Picked unit))
      • Set TempPointTexture2 = (TempPointTexture offset by 12.00 towards (Facing of (Picked unit)) degrees)
      • Destructible - Create a Summer Tree Wall at TempPointTexture facing 0.00 with scale 0.01 and variation 0
      • Unit - Add Texture Changer to (Picked unit)
      • Unit - Order (Picked unit) to Night Elf Mountain Giant - War Club (Last created destructible)
      • Unit - Remove Texture Changer from (Picked unit)
      • Destructible - Remove (Last created destructible)
      • Custom script: call RemoveLocation(udg_TempPointTexture)
      • Custom script: call RemoveLocation(udg_TempPointTexture2)
      • Custom script: set udg_TempPointTexture = null
      • Custom script: set udg_TempPointTexture2 = null
      • Custom script: set bj_lastCreatedDestructable = null
 
Level 11
Joined
Oct 9, 2015
Messages
721
It's easy man!
1: Change your unit-tree model to some of the variations, then the model will be shown but white. (I forgot to mention that one! but maybe it work with the default)
2: Change the "pathing texture" of the tree destructible you're needing to NONE (object editor ->destructibles)
3: create a trigger with the event "time elapsed" or map initialization
4: paste the function I posted.
DONE!
 
Status
Not open for further replies.
Top