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

Setting the Z of a Special Effect

Status
Not open for further replies.
It's not possible to set a special effects z height. For that, you'll need a dummy unit.
However, it is possible to create effects with a given height.

JASS:
function AddSpecialEffectZ takes string modelName, real x, real y, real z returns effect
    //Creates a invisible platform at the given x/y/z coordinates.
    local destructable d = CreateDestructableZ('OTip', x, y, z, 0., 1, 0)
    //The created special effect will now appear on top of the platform.
    set bj_lastCreatedEffect = AddSpecialEffect(modelName, x, y)
    //Removing platform and null the variable. The effect will still keep its height.
    call RemoveDestructable(d)
    set d = null
    //Return effect.
    return bj_lastCreatedEffect
endfunction
 
Status
Not open for further replies.
Top