• 🏆 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!

Dark Spirits

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
At the point of casting spell creates a little magic stone, within which the collected souls of the dead. It revolves around the spirit, which attracts the stone. As we approach the spirit of rock is gaining momentum and growing in size. As soon as the ghost gets into the interior of the stone, as it will explode, releasing three of the spirits at will. Getting into the spirit of the enemy kills him and turns in the opposite direction in search of new victims.

Keywords:
Spirit, Dark, Dark Spirits
Contents

Dark Spirits [spell] (Map)

Reviews
12.12 IcemanBo: For long time as NeedsFix. Rejected. 03:48, 12th Dec 2015 IcemanBo:
Level 37
Joined
Mar 6, 2006
Messages
9,240
Try to use proper indenting because the code is difficult to read.

You could set this to a variable instead of calling it for every looped unit.
JASS:
GetOwningPlayer(d)

You could do the bj_DEGTORAD in the first line
JASS:
set    ang2=GetRandomReal(1.00,359.00)
set    x=GetUnitX(d)+300*Cos(ang2*bj_DEGTORAD)
set    y=GetUnitY(d)+300*Sin(ang2*bj_DEGTORAD)
or
JASS:
set    ang2=GetRandomReal(-bj_PI, bj_PI)
set    x=GetUnitX(d)+300*Cos(ang2)
set    y=GetUnitY(d)+300*Sin(ang2)

JASS:
l=GetSpellTargetLoc()
^You could use
JASS:
GetSpellTargetX()
and
JASS:
GetSpellTargetY()

JASS:
SetUnitScalePercent(sar, sc, sc, sc)
->
JASS:
SetUnitScale()
Notice that you must change the values.

JASS:
GetHandleId(t)
^You could save it to a variable, you're using it several times.

JASS:
Cos(0*bj_DEGTORAD),y+400*Sin(0*bj_DEGTORAD)
0*n = 0.

JASS:
call   SetUnitFlyHeight(sp, 75.00, 99999.00)
Change 99999.00 to 0. 0 is instant.

My eyes hurt from reading the code.
 
Top