- Joined
- Aug 7, 2009
- Messages
- 1,406
SOLVED
So, I'm working on a spell for the 6th hero contest and I just experienced something that I don't seem to be able to solve. I have this code:
That's supposed to make my dummy units fly. But they just won't. They're spawned directly on the ground, and two seconds later, when they should reach the ground, they just die.
Any ideas what I'm doing wrong? Any help is appreciated.
So, I'm working on a spell for the 6th hero contest and I just experienced something that I don't seem to be able to solve. I have this code:
JASS:
loop
set thistype.dummy[baseId+i]=CreateUnit(this.owner,DUMMY_UNIT,x,y,0.)
set thistype.sfx[baseId+i]=AddSpecialEffectTarget(ORB_MODEL,thistype.dummy[baseId+i],"origin")
call SetUnitScale(thistype.dummy[baseId+i],SFX_SCALE,SFX_SCALE,SFX_SCALE)
call SetUnitAnimationByIndex(thistype.dummy[baseId+i],75)
call UnitAddAbility(thistype.dummy[baseId+i],'Amrf')
call UnitRemoveAbility(thistype.dummy[baseId+i],'Amrf')
call SetUnitFlyHeight(thistype.dummy[baseId+i],BASE_HEIGHT,0.) //BASE_HEIGHT is a constant and is equal to 400.
set x=x+OFFSET*cos
set y=y+OFFSET*sin
set i=i-1
exitwhen i==0
endloop
That's supposed to make my dummy units fly. But they just won't. They're spawned directly on the ground, and two seconds later, when they should reach the ground, they just die.
Any ideas what I'm doing wrong? Any help is appreciated.
Last edited: