- Joined
- May 4, 2007
- Messages
- 2,260
Hi guys, I am trying to make a simple star effect for one of my spells, but I have problems =(
I want something like this
||||
...\|/...
|| /|\
I hope some of you can understand. However I can't do that, my maths are not correct. Can some one help me ?
To start, the image should be centered on the caster, and it is not ... than everything messes up basically ... =S
I want something like this
||||
...\|/...
|| /|\
I hope some of you can understand. However I can't do that, my maths are not correct. Can some one help me ?
JASS:
local real x
local real y
local integer i
local integer j
local real distInc
local real angle = 0
set i = 0
loop
exitwhen(i == 8)
set distInc = 0
//in this inner loop we create the lights of each SunRay
set j = 0
loop
exitwhen(j == LightNumber(level))
set x = (casterX + distInc) * Cos(angle)
set y = (casterY + distInc) * Sin(angle)
call DestroyEffect(AddSpecialEffect(LIGHT_EFFECT, x, y))
set distInc = distInc + 100
set j = j + 1
endloop
set angle = angle + 45
set i = i + 1
endloop
To start, the image should be centered on the caster, and it is not ... than everything messes up basically ... =S