Naga'sShadow
Ultra Cool Member
- Reaction score
- 49
I've looked but not seen anything about them outside of systems, how exactly to they work, and is there a tutorial out there about them?
//! textmacro GetSetHandle takes TYPE, TYPENAME
function GetHandle$TYPENAME$ takes handle h, string k returns $TYPE$
return GetStoredInteger(udg_handlevars, I2S(H2I(h)), k)
return null
endfunction
function SetHandle$TYPENAME$ takes handle h, string k, $TYPE$ v returns nothing
call StoredInteger(udg_handlevars,I2S(H2I(h)),k, H2I(v))
endfunction
//! endtextmacro
//! runtextmacro GetSetHandle("unit","Unit")
//! runtextmacro GetSetHandle("location","Loc")
//! runtextmacro GetSetHandle("item","Item")
//! textmacro <name> takes <var1>, <var2>, <etc>
$<var1>$
//! endtextmacro
//! runtextmacro <name>("var1", "var2", etc)