Spellpack Waveform & Mixed Components

Naminator

Coming Back To Life
Reaction score
76
Here are 2 spells that i made. This first one is Waveform like in dota. I do this because i ask how do it time ago, I tried myself and i do it :D. The second is Mixed components.

It's all in GUI. Ther are MUI..but better you see. ;)

Waveform
Copy the trigger and the ability. That's all.
Dissolves into his components and surges forward, dealing damage to everything in his wave.

spells1bw7.jpg


Mixed Components
Copy the trigger and the ability. That's all.
This unit mixed water and electricity making deal extra damage. Can deals Small Charges, Medium Charges and Big Charges. Has 30% to deal charges.

spells2ag6.jpg


Hope you like it!
 

Attachments

  • Spells_FIXED_LEAKS.w3x
    26.1 KB · Views: 1,522
  • Waveform.w3x
    22.8 KB · Views: 1,395

Tinki3

Special Member
Reaction score
418
Waveform:

Nice spell, but with quite a few leaks.
Look at the actions in bold:
Code:
Wave Form
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Waveform 
    Actions
        Set WF_Caster = (Triggering unit)
        [B]Set WF_Caster_Loc = (Position of WF_Caster)[/B]
        [B]Set WF_Point = (Target point of ability being cast)[/B]
        Set WF_Angle = (Angle from WF_Caster_Loc to WF_Point)
        Set WF_Distance = (Distance between WF_Caster_Loc and WF_Point)
        Set WF_Check = False
        [B]Unit - Make WF_Caster face WF_Point over 0.01 seconds[/B]
        Unit - Turn collision for WF_Caster Off
        Unit - Hide WF_Caster
        [B]Trigger - Add to Wave Form Action <gen> the event (Unit - A unit comes within 225.00 of WF_Caster)[/B]
        Trigger - Turn on Wave Form Action <gen>
        Wait until (WF_Check Equal to True), checking every 0.10 seconds
        Unit - Unhide WF_Caster
        Selection - Select WF_Caster for (Owner of WF_Caster)
        Unit - Turn collision for WF_Caster On
        Trigger - Turn off Wave Form Action <gen>
WF_Caster_Loc -> It is very important that you remove this variable immediately after use in this trigger, as its also used in the other trigger that runs every 0.02 seconds. And why is it important? Simply because its first value will leak itself into your comp's memory, and will NOT be able to be removed, as it is set 0.02 seconds later in the periodic trigger.

WF_Point -> This variable is also not removed in this trigger, but, it is needed to compare with in the periodic trigger. Simple work-around here - just remove it after the "Wait until" action.

Unit - Make WF_Caster face WF_Point -> Pretty pointless IMO, the caster is ordered to face WF_Point in the periodic trigger anyway. Remove this action if you want.

Trigger - Add to Wave Form Action -> Bad, bad, bad. And I'll tell you why: adding events to triggers is completely inefficient becuase it can cause double-fires of the added-to-trigger. There is a work-around to this though - you only did this because you probably didn't know of another way to not damage units every 0.02 seconds, and you wanted it to work like Shockwave's damage. Well I've got good news for you - you CAN still make the periodic trigger efficient, and you can still make it damage units like Shockwave. I'll explain how to do this soon.

Next trigger, the periodic one:
Code:
Wave Form Action
    Events
        Time - Every 0.02 seconds of game time
    Conditions
    Actions
        Set WF_Entering_Unit = (Entering unit)
        Unit - Order WF_Caster to damage WF_Entering_Unit for (100.00 + (75.00 x (Real((Level of Waveform  for WF_Caster))))) using attack type Spells and damage type Normal.
        Set WF_Caster_Loc = (Position of WF_Caster)
        [B]Unit - Move WF_Caster instantly to (WF_Caster_Loc offset by 50.00 towards WF_Angle degrees), facing WF_Angle degrees[/B]
        Set WF_Distance = (Distance between WF_Caster_Loc and WF_Point)
        Special Effect - Create a special effect at WF_Caster_Loc using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
        Special Effect - Destroy (Last created special effect)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                WF_Distance Less than or equal to 50.00
            Then - Actions
                Set WF_Check = True
                Trigger - Turn off (This trigger)
            Else - Actions
        Custom script:   call RemoveLocation (udg_WF_Caster_Loc)
Unit - Move WF_Caster instantly to (WF_Caster_Loc offset by 50.00 towards WF_Angle degrees) -> There is a point leak here. Set another point variable to: WF_Caster_Loc offset by 50.00 towards WF_Angle degrees, and then move WF_Caster to that new point variable. You'll need to remove it too, obviously, to prevent another leak :).

Now, about that work-around with the damage thing - I know of a pretty simple, efficient way of doing this. All you need to do, is create a new group variable (I called mine WF_Group), pick every unit within range of WF_Caster_Loc, and then perform an If-Then-Else statement inside the Loop - Actions of that Unit Group function, checking if the Picked unit is part of the new WF_Group variable or not.

If it IS part of the group variable (not added to the group yet), we don't damage them, or do anything, in fact. But, if that unit IS NOT part of the group, we DO damage them, and we also add them to the group. I know what your thinking; "umm... wth?" :p, so let's put this into trigger form.

I've changed both triggers, the periodic one quite alot.
Text in Italic = new/changed.
Code:
Wave Form Fixed
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Waveform 
    Actions
        Set WF_Caster = (Triggering unit)
        Set WF_Caster_Loc = (Position of WF_Caster)
        Set WF_Point = (Target point of ability being cast)
        Set WF_Angle = (Angle from WF_Caster_Loc to WF_Point)
        Set WF_Distance = (Distance between WF_Caster_Loc and WF_Point)
        Set WF_Check = False
        Unit - Turn collision for WF_Caster Off
        Unit - Hide WF_Caster
        [I]Custom script:   call RemoveLocation (udg_WF_Caster_Loc)[/I]
        Trigger - Turn on Wave Form Action <gen>
        Wait until (WF_Check Equal to True), checking every 0.10 seconds
        Unit - Unhide WF_Caster
        Selection - Select WF_Caster for (Owner of WF_Caster)
        Unit - Turn collision for WF_Caster On
        Trigger - Turn off Wave Form Action <gen>
        [I]Custom script:   call RemoveLocation (udg_WF_Point)[/I]
Code:
Wave Form Action Fixed
    Events
        Time - Every 0.02 seconds of game time
    Conditions
    Actions
        [I]Set WF_Caster_Loc = (Position of WF_Caster)[/I]
        [I]Set WF_Offset = (WF_Caster_Loc offset by 50.00 towards WF_Angle degrees)[/I]
        Set WF_Distance = (Distance between WF_Caster_Loc and WF_Point)
        [I]Unit - Move WF_Caster instantly to WF_Offset, facing WF_Angle degrees[/I]
        Special Effect - Create a special effect at WF_Caster_Loc using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
        Special Effect - Destroy (Last created special effect)
        [I]Custom script:   set bj_wantDestroyGroup = true
        Unit Group - Pick every unit in (Units within 225.00 of WF_Caster_Loc matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of WF_Caster)) Equal to True)))) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) is in WF_Group) Not equal to True
                    Then - Actions
                        Unit Group - Add (Picked unit) to WF_Group
                        Unit - Order WF_Caster to damage (Picked unit) for (100.00 + (75.00 x (Real((Level of Waveform  for WF_Caster))))) using attack type Spells and damage type Normal.
                    Else - Actions[/I]
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                WF_Distance Less than or equal to 50.00
            Then - Actions
                Set WF_Check = True
                [I]Unit Group - Remove all units from WF_Group[/I] <== Very important - don't forget to add!
                Trigger - Turn off (This trigger)
            Else - Actions
        Custom script:   call RemoveLocation (udg_WF_Caster_Loc)
        [I]Custom script:   call RemoveLocation (udg_WF_Offset)[/I]

Mixed Components:

This first trigger is pretty worthless, and I'll tell you why: the hero can't "use" the spell unless they have the buff anyway, so, having a trigger that just turns on another in this case, is dumb :D. Delete the trigger that turns on the "real" one, and have the real one initially on.

As for the real trigger, I don't see any problems here, except for the fact that the spell isn't levelable. And, considering the spell DOES have levels, its pretty pointless the way the trigger is atm, IMO. For more info about levelable spells, read here.

_________

Well that's basically all that needs to be fixed, apart from the fact that the tooptips have a "[Nivel]" in them. Change it to "[Level]", just so its in English :).

Good spellpack anyway, +rep.

Oh, and btw, here's the updated map that I fixed for you.
Its been completely fixed, apart from Mixed Components not been levelable, and the tooltips aren't fixed either (I thought you could do those 2 things yourself).
 

TrOlLa

New Member
Reaction score
0
I dont know what i am doing wrong but its not working for me i copied wave form and wave form action (only need waveform) and i copyed the ability but it still wont work? do i have to do it on a blank map?

Ive gotten these off the spells leaks fixed map
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
this resource is severely outdated, you should code your own, after 3 years some change in wc3 could cause it to no longer work
 

TrOlLa

New Member
Reaction score
0
Im not good at triggers and never looked at making spells before.
although one question the waveform works on the demo map but not on a normal map like plaguelands? (comes with wc3 cusom game map)
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
you probably did not do it correctly then, try copying all the variables that they have in the map into yours first
 
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