function for nova (problem with circle)

Akolyt0r

New Member
Reaction score
33
I want a nova-like spell...
dummyspell is some shockwave like ability..
my problem is i dont get a full circle...but only a quarter circle on the right side of my caster ...
Im kinda confused cause
//c like quotation here
for(int i=0;i<=360;i+=10){
x=cx+1*Cos(i*bj_DEGTORAD)
y=cy+1*Sin(i*bj_DEGTORAD)
//Do Something with x,y
}
should generate coordinates around cx,cy with a radius of 1 ...shouldnt it ?
have i got wrong formulas ?

wah Halp meh pls.

JASS:
//code snippet
local unit caster=GetTriggerUnit()
local player p=GetOwningPlayer(caster)
local real cx=GetUnitX(caster)
local real cy=GetUnitY(caster)
local integer i=0
local real x=cx
local real y=cy
local unit dummy
loop
exitwhen i&gt;360
set dummy=CreateUnit(p,dummyid,cx,cy,0)
call UnitApplyTimedLife(dummy,&#039;BTLF&#039;,1)
call SetUnitAbilityLevel(dummy,fxspellid,GetUnitAbilityLevel(caster,spellid))
set x=cx+1*Cos(i*bj_DEGTORAD)
set y=cy+1*Sin(i*bj_DEGTORAD)
call IssuePointOrder(dummy,fxorderstring,x,y)
set i=i+10
endloop

.0.
 

Akolyt0r

New Member
Reaction score
33
i only need a working formula 0.o
no complete nova spell ...
got it working
Code:
set x=cx+[COLOR="Red"]100[/COLOR]*Cos(i*bj_DEGTORAD)
set y=cy+[COLOR="Red"]100[/COLOR]*Sin(i*bj_DEGTORAD)
instead of
Code:
set x=cx+1*Cos(i*bj_DEGTORAD)
set y=cy+1*Sin(i*bj_DEGTORAD)

although my old code should have worked aswell :/
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top