Prometheus
Everything is mutable; nothing is sacred
- Reaction score
- 589
I used this for a spell I made and I figured, "Why not spread it."
rm = random model
You create a local string array, I'm using the name b. Then you set each array part to a model and call it with a string variable and it will give you a random model.
Implement Inst.
Copy function rm
set b[x] to your models and change in 'return b[GetRandomInt(1, 6)] the 6 to the largest array #.
Spell
rm = random model
You create a local string array, I'm using the name b. Then you set each array part to a model and call it with a string variable and it will give you a random model.
Implement Inst.
Copy function rm
set b[x] to your models and change in 'return b[GetRandomInt(1, 6)] the 6 to the largest array #.
JASS:
function rm takes nothing returns string
local string array b
set b[1] = "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdx"
set b[2] = "Abilities\\Spells\\Human\\Invisibility\\InvisibilityTarget.mdx"
set b[3] = "Abilities\\Spells\\Human\\DispelMagic\\DispelMagicTarget.mdx"
set b[4] = "Abilities\\Spells\\Demon\\ReviveDemon\\ReviveDemon.mdx"
set b[5] = "Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdx"
set b[6] = "Abilities\\Spells\\Human\\Resurrect\\Resurrecttarget.mdx"
return b[GetRandomInt(1, 6)]
endfunction
function actions takes nothing returns nothing
local string modl = rm()
call DestroyEffect(AddSpecialEffectTarget(modl, GetTriggerUnit(), "origin"))
endfunction
Spell