Spell Elemental Tri Fury

Tinki3

Special Member
Reaction score
418
Features:
- MUI
- Leakless
- Lagless
- Fun to use, easy to make look different/better
- The best eyecandy spell your eyes can see!

Import Difficulty: Medium - High

Units Affected: Enemy

Target Type: none

Spell Info:

The caster uses the power of Fire, Electricity, and Ice, to create deadly bursts of energy. Fire burns targets, electricity causes waves to bounce against enemies, and Ice chills targets, slowing their movement and attack speed greatly.

Level 1 - Fire deals 25 damage/second, electricity zaps for 40 damage, bouncing 3 times, ice slows speeds by 30%.
Level 2 - Fire deals 35 damage/second, electricity zaps for 60 damage, bouncing 4 times, ice slows speeds by 40%.
Level 3 - Fire deals 45 damage/second, electricity zaps for 80 damage, bouncing 5 times, ice slows speeds by 50%.
Level 4 - Fire deals 55 damage/second, electricity zaps for 100 damage, bouncing 6 times, ice slows speeds by 60%.

tri1ob8.jpg


tri2jd1.jpg


I must say, that the spell actually does look alot better when you're there testing it.

DL the map:
 

Attachments

  • Elemental Tri Fury - Update.w3x
    34.8 KB · Views: 1,274

Tinki3

Special Member
Reaction score
418
Thanks Monsterous :)

Btw, did it happen to lag much at all? I want to know, because I don't get any lag on my comp.

>It didn't lag at all, it's very nice
That's a relief, thanks.

>You forgot the lightining photo..but it doesn't matter
I couldn't get enough bolts in a photo at once..
 

Monsterous

In the Shadows, Lurking.
Reaction score
99
Hmm. Just Realised.
Isnt Earth an Element?
Fire, Water (or in this case Ice), Air (in this case Lightning) and Earth?
For Earth you could do like an Earthquake around the Spell Tester guy that hurts Enemies only and does not affect friendly Units.
 
C

Cazz

Guest
Nice spells tinki3, no they didnt lag on my comp and it looked Awesome :D
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
These are awesome and seems great even for uber slow computers. I think I might be able to learn the ways of graphics from this. +rep :D
 

Pyrogasm

There are some who would use any excuse to ban me.
Reaction score
134
Personally, I find that to be way too much special effect spam...

No lag here, either.
 

Sooda

Diversity enchants
Reaction score
318
Tinki3, well done :p It was hilarious. I ran between creeps and spammed ability. It works really fast, there isn' t much time to react- just run and spam :D
No lag ! Even with my PC (1.2 Ghz, 64 mb video card, 256 DDR ram). What did you used in your code ? Is there Caster System functions used ? I' m curious because I try to learn CS myself right now (Really time consuming @.@ ).
 

Tinki3

Special Member
Reaction score
418
Personally, I find that to be way too much special effect spam...

No lag here, either.
Way too much? Not if you give the spell a long cooldown.

They aren't really all SFX, those fire bursts, lightning bolts, and frost novas are all the model files of units, which is probably why people aren't getting any lag at all.

Also, I've cutomized some gameplay constants; dead units are removed 0.5 seconds after they die, and not 108 seconds after, which prevents that massive after lag (yes, even with 1 gig ram it can lag).

Tinki3, well done :p It was hilarious. I ran between creeps and spammed ability. It works really fast, there isn' t much time to react- just run and spam :D
No lag ! Even with my PC (1.2 Ghz, 64 mb video card, 256 DDR ram). What did you used in your code ? Is there Caster System functions used ? I' m curious because I try to learn CS myself right now (Really time consuming @.@ ).
Caster system wasn't used, just the local handle vars, but that doesn't do anything to the lag.

Glad you liked :)
 

Tom Jones

N/A
Reaction score
437
Fancy one, however have you tried moving your caster when he's channeling?
The timers continues to run :)
 

Tom Jones

N/A
Reaction score
437
It's simple actually. In your InitTrig function add a EVENT_PLAYER_UNIT_SPELL_ENDCAST to your trigger, and then use GetTriggerEventId():
Code:
if GetTriggerEventId() == EVENT_PLAYER_UNIT_SPELL_EFFCT then
    *Start the timer*
elseif GetTriggerEventId() == EVENT_PLAYER_UNIT_SPELL_ENDCAST then
    *Stop the timer*
 

Tinki3

Special Member
Reaction score
418
Code:
function InitTrig_Elemental_Tri_Fury takes nothing returns nothing    
    set gg_trg_Elemental_Tri_Fury = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Elemental_Tri_Fury, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    [B]call TriggerRegisterAnyUnitEventBJ( gg_trg_Elemental_Tri_Fury, EVENT_PLAYER_UNIT_SPELL_ENDCAST )[/B]
    call TriggerAddCondition( gg_trg_Elemental_Tri_Fury, Condition( function Elemental_Tri_Fury_Conditions ) )
    call TriggerAddAction( gg_trg_Elemental_Tri_Fury, function Elemental_Tri_Fury_Actions )
endfunction

Tom, is this how I should the event to the trigger?

EDIT: I'm not too sure as to where to put the 'if's and 'elseif's though. I tried doing it before, and ended up running the whole trigger twice.

So where would I need to put those conditions in this function, for example?:
Code:
function Create_Fire takes nothing returns nothing
    local timer t           = GetExpiredTimer()
    local unit cast         = GetHandleUnit(t, "cast")
    local real angle        = GetHandleReal(t, "angle")
    local real count        = GetHandleReal(t, "count")
    local location cast_loc = GetUnitLoc(cast)
    local location l        = PolarProjectionBJ(cast_loc, Fire_Creation_Base_Offset(), angle)
    local unit dum          = CreateUnitAtLoc(GetOwningPlayer(cast), Fire_Caster_Dummy_ID(),l ,0)
    local timer tt          

    call SetUnitAbilityLevel(dum, Fire_Dummy_Ability_ID(),(GetUnitAbilityLevel(cast, ETF_Ability_ID())))

    if GetWidgetLife(cast) > 0.405 and count < 10 then
        call IssuePointOrderLoc(dum, "flamestrike", l)
    else
        set tt = CreateTimer()
        call SetHandleHandle(tt, "cast", cast)
        call SetHandleReal(tt, "count", 0)
        call TimerStart(tt, Electricity_Timer_Delay(), true, function Create_Electricity)
        set tt = null
        call FlushHandleLocals(t)
        call PauseTimer(t)
        call DestroyTimer(t)        
    endif
 
    call SetHandleReal(t, "angle", GetHandleReal(t, "angle") + Fire_Creation_Angle_Increase())
    call SetHandleReal(t, "count", GetHandleReal(t, "count") + 1)

    call RemoveLocation(cast_loc)
    call RemoveLocation(l)

    set t = null
    set cast = null
    set cast_loc = null
    set l = null
    set dum = null
endfunction
 

Tom Jones

N/A
Reaction score
437
What I like to do is check for a boolean, if it's true then I stop the timer. Have a look at this:
Code:
function Create_Ice takes nothing returns nothing
    local timer ttt         = GetExpiredTimer()
    local unit cast         = GetHandleUnit(ttt, "cast")
    local real offset       = GetHandleReal(ttt, "offset")
    local real count        = GetHandleReal(ttt, "count")
    local location cast_loc = GetUnitLoc(cast)
    local integer i         = 0
    local unit array dum           
    local location array l
    set l[1]                = PolarProjectionBJ(cast_loc, offset, 0)
    set l[2]                = PolarProjectionBJ(cast_loc, offset, 45)
    set l[3]                = PolarProjectionBJ(cast_loc, offset, 90)
    set l[4]                = PolarProjectionBJ(cast_loc, offset, 135)
    set l[5]                = PolarProjectionBJ(cast_loc, offset, 180)
    set l[6]                = PolarProjectionBJ(cast_loc, offset, 225)
    set l[7]                = PolarProjectionBJ(cast_loc, offset, 270)
    set l[8]                = PolarProjectionBJ(cast_loc, offset, 315)

    loop
        set i = i + 1
        exitwhen i > 8
        set dum[i]          = CreateUnitAtLoc(GetOwningPlayer(cast), Ice_Caster_Dummy_ID(),l[i] ,0)
        call SetUnitAbilityLevel(dum[i], Ice_Dummy_Ability_ID(),(GetUnitAbilityLevel(cast, ETF_Ability_ID())))
    endloop
    set i = 0

    if GetWidgetLife(cast) > 0.405 and count < 3 then
        loop
            set i = i + 1
            exitwhen i > 8
            call IssueImmediateOrder(dum[i], "thunderclap")
        endloop
        set i = 0
[B]    elseif GetHandleBoolean(cast,"ElementalTriFury_StopTimer") == true then
        call PauseTimer(ttt)
        call SetHandleBoolean(cast,"ElementalTrIFury_StopTimer") == false
        call FlushHandleLocals(ttt)
        call DestroyTimer(ttt)[/B]
    else
        call FlushHandleLocals(ttt)
        call PauseTimer(ttt)
        call DestroyTimer(ttt)
    endif

    call SetHandleReal(ttt, "count", GetHandleReal(ttt, "count") + 1)
    call SetHandleReal(ttt, "offset", GetHandleReal(ttt, "offset") + Ice_Dummy_Unit_Offset_Increase_Value()) 

    call RemoveLocation(cast_loc)
    loop
       set i = i + 1
       exitwhen i > 8
           call RemoveLocation (l[i])          
    endloop
    set i = 0

    set ttt = null
    set cast = null
    set cast_loc = null
    loop
       set i = i + 1
       exitwhen i > 8
           set l[i] = null
           set dum[i] = null
    endloop
endfunction

function Create_Electricity takes nothing returns nothing
    local timer tt          = GetExpiredTimer()
    local unit cast         = GetHandleUnit(tt, "cast") 
    local real count        = GetHandleReal(tt, "count")
    local location cast_loc = GetUnitLoc(cast)
    local location l        = PolarProjectionBJ(cast_loc, GetRandomInt(100, 500), GetRandomDirectionDeg())
    local unit dum          = CreateUnitAtLoc(GetOwningPlayer(cast), Electric_Caster_Dummy_ID(),l ,0)
    local group g           = CreateGroup()
    local boolexpr b        = Condition(function ETF_Filter)
    local unit p
    local integer i
    local timer ttt

    call SetUnitAbilityLevel(dum, Electric_Dummy_Ability_ID(),(GetUnitAbilityLevel(cast, ETF_Ability_ID())))

    if GetWidgetLife(cast) > 0.405 and count < 9 then
        call GroupEnumUnitsInRange(g, GetUnitX(dum), GetUnitY(dum), 200, b)
        set i = CountUnitsInGroup(g)
        if i > 0 then
            set p = GroupPickRandomUnit(g)
            call IssueTargetOrder(dum, "chainlightning", p)
            set p = null
        endif
[B]    elseif GetHandleBoolean(cast,"ElementalTriFury_StopTimer") == true then
        call PauseTimer(tt)
        call SetHandleBoolean(cast,"ElementalTrIFury_StopTimer") == false
        call FlushHandleLocals(tt)
        call DestroyTimer(tt)[/B]
    else
        set ttt = CreateTimer()
        call SetHandleHandle(ttt, "cast", cast)
        call SetHandleReal(ttt, "offset", 50)
        call SetHandleReal(ttt, "count", 0)
        call TimerStart(ttt, Ice_Timer_Delay(), true, function Create_Ice)
        set ttt = null
        call FlushHandleLocals(tt)
        call PauseTimer(tt)
        call DestroyTimer(tt)
    endif

    call SetHandleReal(tt, "count", GetHandleReal(tt, "count") + 1)

    call RemoveLocation(cast_loc)
    call RemoveLocation(l)
    call DestroyGroup(g)
    call DestroyBoolExpr(b)

    set tt = null
    set cast = null
    set cast_loc = null
    set l = null
    set dum = null
    set g = null
    set b = null
endfunction

function Create_Fire takes nothing returns nothing
    local timer t           = GetExpiredTimer()
    local unit cast         = GetHandleUnit(t, "cast")
    local real angle        = GetHandleReal(t, "angle")
    local real count        = GetHandleReal(t, "count")
    local location cast_loc = GetUnitLoc(cast)
    local location l        = PolarProjectionBJ(cast_loc, Fire_Creation_Base_Offset(), angle)
    local unit dum          = CreateUnitAtLoc(GetOwningPlayer(cast), Fire_Caster_Dummy_ID(),l ,0)
    local timer tt          

    call SetUnitAbilityLevel(dum, Fire_Dummy_Ability_ID(),(GetUnitAbilityLevel(cast, ETF_Ability_ID())))

    if GetWidgetLife(cast) > 0.405 and count < 10 then
        call IssuePointOrderLoc(dum, "flamestrike", l)
[B]    elseif GetHandleBoolean(cast,"ElementalTriFury_StopTimer") == true then
        call PauseTimer(t)
        call SetHandleBoolean(cast,"ElementalTrIFury_StopTimer") == false
        call FlushHandleLocals(t)
        call DestroyTimer(t)[/B]
    else
        set tt = CreateTimer()
        call SetHandleHandle(tt, "cast", cast)
        call SetHandleReal(tt, "count", 0)
        call TimerStart(tt, Electricity_Timer_Delay(), true, function Create_Electricity)
        set tt = null
        call FlushHandleLocals(t)
        call PauseTimer(t)
        call DestroyTimer(t)
    endif
 
    call SetHandleReal(t, "angle", GetHandleReal(t, "angle") + Fire_Creation_Angle_Increase())
    call SetHandleReal(t, "count", GetHandleReal(t, "count") + 1)

    call RemoveLocation(cast_loc)
    call RemoveLocation(l)

    set t = null
    set cast = null
    set cast_loc = null
    set l = null
    set dum = null
endfunction

function Elemental_Tri_Fury_Actions takes nothing returns nothing
    local unit cast         = GetTriggerUnit()
    local location cast_loc = GetUnitLoc(cast)
    local timer t           = CreateTimer()

[B]    if GetTriggerEventId() == EVENT_PLAYER_UNIT_SPELL_EFFECT then[/B]
    call SetHandleHandle(t, "cast", cast)
    call SetHandleReal(t, "angle", GetRandomInt(1, 360))
    call SetHandleReal(t, "count", 0)
    call TimerStart(t, Fire_Timer_Delay(), true, function Create_Fire)

[B]    elseif GetTriggerEventId() == EVENT_PLAYER_UNIT_SPELL_ENDCAST then
        call SetHandleBoolean(cast,"ElementalTriFury_StopTimer",true)
    endif[/B]
    call RemoveLocation(cast_loc)

    set cast = null
    set cast_loc = null
    set t = null    
endfunction
 

Sim

Forum Administrator
Staff member
Reaction score
534
When I made Sacred Circle I posted it on some site and a reviewer told me you can use order checks to see if the spell has ended or not, instead of using event checks. It is more efficient.

Though this method works too :rolleyes:
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top