- Joined
- Sep 30, 2009
- Messages
- 698
Could someone tell me how to enable variations for doodads and destructibles with custom models without having to write a textmacro for it? I have 10 trees named tree0 - tree9, but when i want to type "Models\\Doodads\\Tree\\Tree"
into the field it just adds .mdl afterwards. Is there a way around this? If not I wrote that little thingy here that made it work, but it sucks to have to reopen the map afterwards :/
into the field it just adds .mdl afterwards. Is there a way around this? If not I wrote that little thingy here that made it work, but it sucks to have to reopen the map afterwards :/
JASS:
//! textmacro EnableVariations takes id type model
//! externalblock extension=lua ObjectMerger $FILENAME$
//! i setobjecttype("$type$")
//! i modifyobject("$id$")
//! i makechange(current, "dfil", "$model$")
//! endexternalblock
//! endtextmacro
//! runtextmacro EnableVariations("D003", "Doodads", "Models\\Doodads\\Tree\\Tree")