• 🏆 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!

Textmacro parameters

Status
Not open for further replies.
Level 5
Joined
Oct 24, 2007
Messages
90
Hello, just wondering about something recently. I am developing a spell in which dummies are spawned for it in the form of lightning orbs... and I use textmacros for it. Is there a way to set parameters to variables? I want people to choose how many dummies are spawned from the constant global block. Here's an example:

JASS:
//! textmacro create takes INTEGER
    set this.Dummy$INTEGER$ = CreateUnit(bla bla)
//! endtextmacro

function SomeFunction takes nothing returns nothing
    local string S = "1"
    local integer I = 1
    //! runtextmacro create(I)  [Is there a way to make this work?]
    //! runtextmacro create(S)  [Or is it done this way?]
    //Or is it even possible? D:
endfunction

I use textmacro method instead of loops since struct members cannot be arrays (they can't... can they?). Thank you.
 
Status
Not open for further replies.
Top