Circle of Blades

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
I have no idea how to code this one... But was wondering if someone else did.

I need a circle of blades to fly to a target hitting any units in the way. Which spin in a circle along the way.
 

Exide

I am amazingly focused right now!
Reaction score
448
You will need some kind of blade/sword model that you can use for the spinning.
Then I guess you can make a trigger which orders the model to spin by facing different directions, and move it forward at the same time. (Better yet would be if the model has some spinning animation to begin with.)
 

SilverEagle

New Member
Reaction score
3
If i were u, i would use Shadow Hunter's normal attack as for the spinning blades, and add a normal fire to each and one of them, to get them spinning im not rly sure how to >.<
 

Fluffball

Well-Known Member
Reaction score
35
Shadow Hunter's blades automatically spin, but in my opinion they would be too big, imagine 3 or 4 of them in a circle, it would be massive, unless you scaled them, then they dont look as good, I reccomend using Glaive (Maybe too big) or Spell Binder's missile.
 

Jagan

New Member
Reaction score
30
Shadow Hunter's blades automatically spin, but in my opinion they would be too big, imagine 3 or 4 of them in a circle, it would be massive, unless you scaled them, then they dont look as good, I reccomend using Glaive (Maybe too big) or Spell Binder's missile.

You mean Spell Breaker, right?
 

Kazuga

Let the game begin...
Reaction score
110
Well, it was pretty easy to code it actually.

Sliding Wispwheel.
Made in vJass.
Requires: NewGen and HAIL (HAIL can be found in the demo map.)

How to implement:
Copy the SlidingWispwheel trigger to your map with the dummy, change the raw codes to yours.
If you don't have HAIL in your map simply copy that too. You don't have to change anything at all inside of it.

Code:
JASS:
scope SlidingWispwheel initializer Lightning
//! runtextmacro HAIL_CreateProperty (&quot;Data&quot;, &quot;integer&quot;, &quot;private&quot;)
globals
private constant integer dummyID = &#039;u000&#039;  //Dummy unit raw code.
private constant integer raw     = &#039;A000&#039; //Ability raw code.
private constant integer damage  = 25    //The damage dealt to each unit.
private constant integer aoe  = 200   //The area of effect of the damage.
private constant real speed = 0.05 //How often the sliding runs.
private constant integer distance = 700 //How far the &quot;projectile&quot; goes.
private constant integer offset = 100 //Distance from the center to the dummy units.
private constant integer dummyamount = 16//How many dummy units that will circle

group Az
unit WispwheelCaster  = null
endglobals
private struct TestStruct
real RotateAngle
real angle
unit array dummy [dummyamount]
integer delay
integer FirstTime
real tx
real ty
timer Timer
unit caster
integer distance
endstruct

private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == raw
endfunction
function Trig_Wispwheel_FilterCondition takes nothing returns boolean
    return GetWidgetLife( GetFilterUnit() ) &gt; 0.405 and IsUnitEnemy( GetFilterUnit(), GetOwningPlayer( WispwheelCaster ) ) == true
    
endfunction

private function GroupCallback takes nothing returns nothing
    local unit affected = GetEnumUnit () 
    call UnitDamageTarget(WispwheelCaster,affected,(damage*I2R(GetUnitAbilityLevel(WispwheelCaster,raw))),true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)
   set affected = null
endfunction


private function ASlide takes nothing returns nothing
    local TestStruct data = GetData (GetExpiredTimer ())
    local real x = data.tx + 30 * Cos(data.angle*bj_DEGTORAD)
    local real y = data.ty + 30 * Sin(data.angle*bj_DEGTORAD)
    local real x2 
    local real y2
    local integer Loop = 0
    
    set data.tx = x
    set data.ty = y
    loop
        exitwhen Loop == dummyamount
        set Loop = Loop + 1
        set x2 = x + 200 * Cos(data.RotateAngle*bj_DEGTORAD)
        set y2 = y + 200 * Sin(data.RotateAngle*bj_DEGTORAD)
        set data.RotateAngle = data.RotateAngle + (360/dummyamount)
        set data.RotateAngle = data.RotateAngle + 1
        call SetUnitFacing(data.dummy[Loop],data.RotateAngle)
        call SetUnitX(data.dummy[Loop],x2)
        call SetUnitY(data.dummy[Loop],y2)
        if RectContainsUnit(GetPlayableMapRect(),data.dummy[Loop]) == false then
            call RemoveUnit(data.dummy[Loop])
            call PauseTimer (data.Timer)
            call ResetData (data.Timer)
            call DestroyTimer (data.Timer)
            call data.destroy ()
        endif
    endloop
    set Loop = 0
    set WispwheelCaster = data.caster
    set Az = CreateGroup()
    call GroupEnumUnitsInRange(Az,x,y,aoe,Condition(function Trig_Wispwheel_FilterCondition))
    call ForGroup(Az,function GroupCallback)
    call DestroyGroup(Az) 
    
    set data.distance = data.distance + 30
    if data.distance &gt;=distance then
    set data.distance = 0
        loop
            exitwhen Loop == dummyamount
            set Loop = Loop + 1
            call RemoveUnit(data.dummy[Loop])
            call PauseTimer (data.Timer)
            call ResetData (data.Timer)
            call DestroyTimer (data.Timer)
            call data.destroy ()
        endloop
    endif

endfunction


private function Actions takes nothing returns nothing
local TestStruct data = TestStruct.create ()
    local real x        =     GetUnitX(GetTriggerUnit())
    local real y        =     GetUnitY(GetTriggerUnit())
    local real angle    =     0
    local location loc = GetSpellTargetLoc()
    local location loc2 = GetUnitLoc(GetTriggerUnit())
    local integer Loop = 0
    
    loop   
        exitwhen Loop == dummyamount
        set Loop = Loop + 1
        set data.dummy[Loop] = CreateUnit(GetOwningPlayer(GetTriggerUnit()),dummyID,x,y,GetUnitFacing(GetTriggerUnit()))
    endloop
    set data.tx = GetLocationX(loc2)
    set data.ty = GetLocationY(loc2)
    set angle = AngleBetweenPoints(loc2,loc) 
    set data.angle = angle
    call RemoveLocation(loc)
    call RemoveLocation(loc2)
    set data.Timer = CreateTimer()
    call TimerStart (data.Timer,speed,true, function ASlide)
    call SetData (data.Timer, data)
    set data.caster = GetTriggerUnit()
endfunction


//===========================================================================

private function SafeFilt takes nothing returns boolean
return true
endfunction
private function Lightning takes nothing returns nothing
 local trigger trig = CreateTrigger()
local integer i = 0
loop
    exitwhen i &gt; 15
    call TriggerRegisterPlayerUnitEvent(trig,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,Condition(function SafeFilt))
    set i = i + 1
endloop
 call TriggerAddCondition (trig, Condition (function Conditions ) )
 call TriggerAddAction (trig, function Actions )
 set trig = null
 endfunction

endscope
 

vypur85

Hibernate
Reaction score
803
Not sure how to do it MUI in GUI. But I think one way is to move an invisible dummy in a straight line. And then let another visible dummy to circle around the invisible dummy. There could be some maths formula for this though so that the invisible dummy is not needed. But I don't know what is it. My maths is a bit rusty :p.

Edit:
=.="
 

Kazuga

Let the game begin...
Reaction score
110
You don't have to use an invisible dummy, use the point of which you would have moved the invisible dummy. Making it MUI in GUI would be a real pain though...
 

vypur85

Hibernate
Reaction score
803
> Making it MUI in GUI would be a real pain though...

Yeah... Tried it, and failed :p. Thought of playing with some sin graph and all but also failed :p. Using JASS should be much much simpler. I can't learn it though.
 

Kazuga

Let the game begin...
Reaction score
110
>I can't learn it though.
Why? It's a lot easier than many thinks. Though I have to admit that some things are so complicated that even I don't fully know what they do even if I know how to use them.
 

vypur85

Hibernate
Reaction score
803
I've learnt a bit actually. Played around with Kattana's handle var. But I can't test map =.=. I'm using Kaspersky and my WC3 is copied from my friend's. Tried a lot of things and failed, finally gave up. And so, that's the whole story... I'll just stick with GUI...... :p

Yes, yes... Fine... Laugh all you can... :p
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
I'll test your spell, Kazuga, when I can. Right now I'm on my laptop w/o Wc3.
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Kazuga's works fine....

Thanks Kazuga.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top