• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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