Spell Quick Dash

duyen

New Member
Reaction score
214
Couldn't post a picture, but here it is.

This spell causes the unit to dash to a certain point with the maximum range of 900, creating a blurry effect and destroying all destructables in its way.

Please post all comments. If you find any leaks, please post them here and how to fix them.

EDIT: I updated the spell.

Here's the code.

Code:
quick dash
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Quick Dash 
    Actions
        Set Temp_Point = (Target point of ability being cast)
        Set Temp_CasterPoint = (Position of Temp_Caster)
        Set CasterTarget_Distance = (Distance between Temp_CasterPoint and Temp_Point)
        Set Temp_Caster = (Triggering unit)
        Unit - Create 1 Dummy for Player 1 (Red) at (Target point of ability being cast) facing (Facing of Temp_Caster) degrees
        Set Temp_Dummy = (Last created unit)
        Animation - Change Temp_Dummy's vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency
        Unit - Turn collision for Temp_Caster Off
        Trigger - Turn on move <gen>
        Custom script:   call RemoveLocation (udg_Temp_Point)

Code:
    move
    Events
        Time - Every 0.02 seconds of game time
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Movement Greater than or equal to CasterTarget_Distance
            Then - Actions
                Trigger - Turn off (This trigger)
                Unit - Remove Temp_Dummy from the game
                Unit - Turn collision for Temp_Caster On
                Unit Group - Pick every unit in (Units of type Dummy) and do (Actions)
                    Loop - Actions
                        Unit - Remove (Picked unit) from the game
            Else - Actions
        Set Movement = (Movement + 5.00)
        Unit - Move Temp_Caster instantly to (Temp_CasterPoint offset by Movement towards (Facing of Temp_Caster) degrees)
        Custom script:   call RemoveLocation(udg_Temp_CasterPoint)
        Unit - Create 1 Dummy for Player 1 (Red) at Temp_CasterPoint facing (Facing of Temp_Caster) degrees
        Animation - Change (Last created unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency
        Custom script:   call RemoveLocation(udg_Temp_Point)
        Set Temp_Point = (Position of Temp_Caster)
        Custom script:   call RemoveLocation (udg_Temp_CasterPoint)
        Destructible - Pick every destructible within 200.00 of Temp_Point and do (Actions)
            Loop - Actions
                Destructible - Kill (Picked destructible)
                Custom script:   call RemoveLocation(udg_Temp_Point)
 

WarLuvr3393

Hmmm...too many things to play (WoW, COD4, WC3)
Reaction score
54
I was quickly sifting through your triggers and I found this:

Code:
Destructible - Pick every destructible within 200.00 of (Position of Temp_Caster) and do (Actions)
    Loop - Actions
        Destructible - Kill (Picked destructible)

If you see "(Position of Temp_Caster)", positions or points are a form of locations and locations leak if not destroyed.

Use a variable named "Temp_Point", set that to the position of the Temp_Caster then use the custom script: "call RemoveLocation(udg_Temp_Point)"

There's probably a lot more, so check this out ASAP.

Edit: Here's some more leaks. :)

Code:
Unit - Create 1 Dummy for Player 1 (Red) at ([b][color=red]Position[/b][/color] of Temp_Caster) facing (Facing of Temp_Caster) degrees

Code:
Unit - Create 1 Dummy for Player 1 (Red) at (Target [color=red][b]point[/b][/color] of ability being cast) facing (Facing of Temp_Caster) degrees
 

duyen

New Member
Reaction score
214
War i'll add that

Thanks for the other leaks. How exactly can I fix them? I'm a noob at Custom Scripts

Errm... it's two triggers if you didnt notice. For 2nd leak
 

WarLuvr3393

Hmmm...too many things to play (WoW, COD4, WC3)
Reaction score
54
Um, if you're no good with custom scripts, how come I see them in your GUI code? :eek: Instead of "DestroyGroup(udg_Variable)" use "RemoveLocation(udg_Variable)".

Yeah, don't double post. Dash spells are so easy to make, in GUI that is, so if you're going to make one, make sure yours is leakless, and unique.
 

WarLuvr3393

Hmmm...too many things to play (WoW, COD4, WC3)
Reaction score
54
Offtopic: Yep, if you didn't see, I gave you a suggestion. But great spell!

If you don't fix the leaks in your map, it's not going to be even WORTH uploading because it'll lag up the game.

Edit: I tested it out and it gets HELLA laggy after 2-3 casts, not just from the leaks, but also from the dummy units that don't get removed from the game. You need to fix this ASAP because I give this spell a 1/10.
 

Blackrage

Ultra Cool Member
Reaction score
25
when i dled your map it bugged.

You still need to remove the created units, add a expiration timer to that. Next, dont base your dummy units on heros. Third, make the dummy units not have food cost.

Also, i dont like making the models based on units because when they die, they will show their death animation.
 

Sim

Forum Administrator
Staff member
Reaction score
534
Hmm, when i casted this spell it did nothing, except create some shadowy "myself" next to me and... that's all.

> Unit - A unit Begins casting an ability

You might want to use "Starts the effect of an ability"

> Set CasterTarget_Distance = (Distance between (Position of Temp_Caster) and (Position of (Target unit of ability being cast)))

2 leaks.

> Unit - Create 1 Dummy for Player 1 (Red) at (Target point of ability being cast) facing (Facing of Temp_Caster) degrees

Use functions such as (Owner of (Triggering unit)) and there's also 1 leak.

> Unit Group - Pick every unit in (Units of type Dummy) and do (Actions)

Group leak.

> Unit - Move Temp_Caster instantly to (Temp_CasterPoint offset by Movement towards (Facing of Temp_Caster) degrees)

Point with offset leaks.

> Unit - Create 1 Dummy for Player 1 (Red) at (Position of Temp_Caster) facing (Facing of Temp_Caster) degrees

Don't use Player 1 (Red) and there's a point leak.

Code:
Destructible - Pick every destructible within 200.00 of [B](Position of Temp_Caster)[/B] and do (Actions)
    Loop - Actions
        Destructible - Kill (Picked destructible)
        Custom script:   call RemoveLocation(udg_Temp_Point)

Point leak, and remove it outside the loop.
 

Tinki3

Special Member
Reaction score
418
Why is the spell triggers posted in JASS? To copy a GUI trigger, simply right-click on the name of the trigger above the Events, and select "Copy as Text" from the list.

Then you can paste it here and wrap it in Code tags. Thanks for making the effort to post the code anyway, but converted GUI triggers look horrible :p
 

duyen

New Member
Reaction score
214
Thanks Tink3 i'll make sure to post in GUI if you give me one minute...

K, I posted in GUI
 

WarLuvr3393

Hmmm...too many things to play (WoW, COD4, WC3)
Reaction score
54
In your first trigger, do you see "Position of Temp Caster?" You have to create a variable for that also. So like "Set Temp_Point_Two = Position of Temp_Caster". Like I said before, points are locations and locations leak.
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
ok...come on bro...some screenie will makes the approves faster xD
Jk jk

Just screenie will make the spell more attractive...
 

Sim

Forum Administrator
Staff member
Reaction score
534
Hmm, when i casted this spell it did nothing, except create some shadowy "myself" next to me and... that's all.

> Unit - A unit Begins casting an ability

You might want to use "Starts the effect of an ability"

> Set CasterTarget_Distance = (Distance between (Position of Temp_Caster) and (Position of (Target unit of ability being cast)))

2 leaks.

> Unit - Create 1 Dummy for Player 1 (Red) at (Target point of ability being cast) facing (Facing of Temp_Caster) degrees

Use functions such as (Owner of (Triggering unit)) and there's also 1 leak.

> Unit Group - Pick every unit in (Units of type Dummy) and do (Actions)

Group leak.

> Unit - Move Temp_Caster instantly to (Temp_CasterPoint offset by Movement towards (Facing of Temp_Caster) degrees)

Point with offset leaks.

> Unit - Create 1 Dummy for Player 1 (Red) at (Position of Temp_Caster) facing (Facing of Temp_Caster) degrees

Don't use Player 1 (Red) and there's a point leak.

Code:
Destructible - Pick every destructible within 200.00 of [B](Position of Temp_Caster)[/B] and do (Actions)
    Loop - Actions
        Destructible - Kill (Picked destructible)
        Custom script:   call RemoveLocation(udg_Temp_Point)

Point leak, and remove it outside the loop.

Did you fix all that?
 
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