• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Lightning effect height problem

Not open for further replies.
Level 10
Jun 6, 2007
[SOLVED] Lightning effect height problem

I'm creating a triggered life drain spell. Everything else works, but I'd like the lightning to be displayed correctly also when the spell is cast on flying units. So I do the following:
set casterX = GetUnitX(this.caster)
set targetX = GetUnitX(this.target)
set casterY = GetUnitY(this.caster)
set targetY = GetUnitY(this.target)
set casterZ = GetUnitFlyHeight(this.caster)
set targetZ = GetUnitFlyHeight(this.target)
call MoveLightningEx(this.light, true, casterX, casterY, casterZ, targetX, targetY, targetZ)
Still the height is too low.

SOLVED by using ZLibrary.
Not open for further replies.