Spell Torrent

Angel_Island

Much long, many time, wow
Reaction score
56
TORRENT
Made by Angel_Island


GUI/JASS: GUI

MUI/MPI: MUI

Leakless + Lagless

Import Difficulty: Low

Spell Info:

Using his unparalleled knowledge of the sea, Daelin is able to summon a blast of water at a targeted area. After 2 seconds a fierce torrent of water erupts from the ground, the stream blasting enemies caught in the AoE into the sky, dealing damage and slowing movement speed by 30%.

Level 1 - 120 damage, lasts 1 second.
Level 2 - 180 damage, lasts 2 second.
Level 3 - 240 damage, lasts 3 second.
Level 4 - 300 damage, lasts 4 second.

Torrent.JPG

Trigger:
  • Torrent Casting
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Torrent
    • Actions
      • Set TorrentTargetPoint[TorrentInstances] = (Target point of ability being cast)
      • Custom script: if IsUnitAlly (udg_TorrentCaster, GetLocalPlayer ()) then
      • Special Effect - Create a special effect at TorrentTargetPoint[TorrentInstances] using Objects\Spawnmodels\Other\IllidanFootprint\IllidanWaterSpawnFootPrint.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: endif
      • Set TorrentInstances = (TorrentInstances + 1)
      • Set TorrentInstances2 = (TorrentInstances2 + 1)
      • Wait 2.00 seconds
      • Special Effect - Create a special effect at TorrentTargetPoint[(TorrentInstances - TorrentInstances2)] using TidalErruption.mdx
      • Special Effect - Destroy (Last created special effect)
      • Set TorrentCaster = (Triggering unit)
      • Set TorrentGroup = (Units within 225.00 of TorrentTargetPoint[(TorrentInstances - TorrentInstances2)] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) Not equal to (Triggering unit)) and (((Matching unit) is in TorrentUnits) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of TorrentCaster)) Equal to True)
      • Unit Group - Add all units of TorrentGroup to TorrentUnits
      • Unit Group - Pick every unit in TorrentUnits and do (Actions)
        • Loop - Actions
          • Unit - Add Storm Crow Form to (Picked unit)
          • Unit - Remove Storm Crow Form from (Picked unit)
          • Unit - Turn collision for (Picked unit) Off
          • Unit - Pause (Picked unit)
      • Custom script: call RemoveLocation(udg_TorrentTargetPoint[udg_TorrentInstances])
      • Set TorrentInstances2 = (TorrentInstances2 - 1)
      • Custom script: call DestroyGroup(udg_TorrentGroup)


Trigger:
  • Torrent Flying
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
    • Unit Group - Pick every unit in TorrentUnits and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Custom value of (Picked unit)) Less than 50
          • Then - Actions
            • Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) + 1)
            • Animation - Change (Picked unit) flying height to ((Power(25.00, 2.00)) - ((25.00 - (Real((Custom value of (Picked unit))))) x (25.00 - (Real((Custom value of (Picked unit))))))) at 0.00
            • Unit - Cause TorrentCaster to damage (Picked unit), dealing (1.20 + (1.20 x (Real((Level of Torrent for TorrentCaster))))) damage of attack type Hero and damage type Universal
            • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl
            • Special Effect - Destroy (Last created special effect)
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Custom value of (Picked unit)) Equal to 50
              • Then - Actions
                • Set TorrentPickingUnits = (Units in (Playable map area) matching ((((Matching unit) is in TorrentUnits) Equal to True) and ((Custom value of (Matching unit)) Greater than or equal to 50)))
                • Unit Group - Pick every unit in TorrentPickingUnits and do (Actions)
                  • Loop - Actions
                    • Unit Group - Remove (Picked unit) from TorrentUnits
                    • Animation - Change (Picked unit) flying height to 0.00 at 0.00
                    • Unit - Turn collision for (Picked unit) On
                    • Set TorrentPickedUnitPosition = (Position of (Picked unit))
                    • Unit - Create 1 Dummy for (Owner of TorrentCaster) at TorrentPickedUnitPosition facing Default building facing degrees
                    • Custom script: call RemoveLocation(udg_TorrentPickedUnitPosition)
                    • Unit - Add Torrent Slow to (Last created unit)
                    • Unit - Set level of Torrent Slow for (Last created unit) to (Level of Torrent for TorrentCaster)
                    • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                    • Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
                    • Unit - Unpause (Picked unit)
                    • Unit - Set the custom value of (Picked unit) to 0
                    • Custom script: call DestroyGroup(udg_TorrentPickingUnits)
              • Else - Actions
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Number of units in TorrentUnits) Equal to 0
              • Then - Actions
                • Custom script: call DestroyGroup(udg_TorrentUnits)
                • Set TorrentInstances = 0
                • Set TorrentInstances2 = 0
              • Else - Actions


Update: Fixed MUI and some leaks.
 

Attachments

  • Torrent.w3x
    47.1 KB · Views: 273

simonake

New Member
Reaction score
72
Please, post triggers and screenshots.

Leaks:
Trigger:
  • Special Effect - Create a special effect at (Target point of ability being cast) using Objects\Spawnmodels\Other\IllidanFootprint\IllidanWaterSpawnFootPrint.mdl

You have to set it to a variable otherwise, it will create memory leaks.

Turning on/off a triggers can create bug if it's turned off while it being casted

Trigger:
  • Unit Group - Add all units of (Units within 225.00 of TorrentTargetPoint[(TorrentInstances - TorrentInstances2)] matching ((((Matching unit) is A strucutre) Equal to_ FALSE) and ((((Matching unit) is alive) Equal to_ TRUE) and (((Matching unit) different from (Triggering unit)) and (((Matchin to TorrentUnits...

You have to add unit by a with a variable and destroy it after . otherwise it's create memory leaks.

Watch all your variables of this type and you will be okay. Very nice spells, it's as it is in Dota.

Turning on/off a triggers can create bug if it's turned off while it being casted
I suggest to you to just never close/open it.
 

simonake

New Member
Reaction score
72
Have you read my first post? I gave you few mistake that make your spells non-leakless. If you want to get your spells aprooved by admins, it gotta be leakless and for now, it's not.
 

BRUTAL

I'm working
Reaction score
118
yea there are alot of leaks
take out the 'Leakless + Lagless' part until you fix it
 

Flare

Stops copies me!
Reaction score
662
Please, post triggers and screenshots.

Leaks:
Trigger:
  • Special Effect - Create a special effect at (Target point of ability being cast) using Objects\Spawnmodels\Other\IllidanFootprint\IllidanWaterSpawnFootPrint.mdl

You have to set it to a variable otherwise, it will create memory leaks.
The special effect isn't leaking - all GUI actions that create special effects set a variable (bj_lastCreatedEffect). On the line immediately after the one you posted,
Code:
Special Effect - Destroy (Last created special effect)
Last created special effect returns bj_lastCreatedSpecialEffect. There's no leak with that effect

Code:
# Set TorrentInstances = (TorrentInstances + 1)
# Set TorrentInstances2 = (TorrentInstances2 + 1)

[(TorrentInstances - TorrentInstances2)]
That makes no sense whatsoever - unless TorrentInstances and TorrentInstances2 have been initialized to 2 different values, you're always using the same array index, over and over. I see no point in what you're doing with that - is there any?
 

simonake

New Member
Reaction score
72
* Posting triggers help members and moderrator to see if it's leaking/mui and if not help you correcting it.
* Posting picture help the people needing spells to know what you spell is and what it do.
 

D.V.D

Make a wish
Reaction score
73
This spell is not MUi so take the MUI part out. Also, set your units into a variable. That will make it leak less. MUI means many units can cast the same ability at once without any problems.
 

Romek

Super Moderator
Reaction score
963
> The special effect isn't leaking
However. "(Target point of ability being cast)" does leak.
And it's on the same line.
 

BlackRose

Forum User
Reaction score
239
The only thing is:
The model that I don't like about the visual part of the spell.

(I attached it)
 

Blackrage

Ultra Cool Member
Reaction score
25
Theres a unit group leak in there. Set it into a variable before-hand and destroy it afterwards.

Like this:

Trigger:
  • SomeTrigger
    • Events
    • Conditions
    • Actions
      • Set SomeGroup = (Units within XXX.00 of (SomePoint))
      • Unit Group - Pick every unit in SomeGroup and do (Actions)
        • Loop - Actions
          • Custom Script - Do Something here.
      • Custom Script - call DestroyGroup(udg_SomeGroup)
 

Angel_Island

Much long, many time, wow
Reaction score
56
Trigger:
  • Set TorrentTargetPoint[TorrentInstances] = (Target point of ability being cast)


I wonder one thing. How do I remove this location?
 

Igor_Z

You can change this now in User CP.
Reaction score
61
I found a leak Unit Group - Pick every unit in (Units in (Playable map area) matching ((((Matching unit) is in TorrentUnits) Equal to True) and ((Custom value of (Matching unit)) Greater than or equal to 50))) and do (Actions), put this in a unit ground variable then remove it, otherwise it is a leak...
 

Angel_Island

Much long, many time, wow
Reaction score
56
call RemoveLocation(TorrentTargetPoint[TorrentInstances]) doesn't work. I will fix the leak.
 

Igor_Z

You can change this now in User CP.
Reaction score
61
LoL, i know whats the problem... I constructed a custom script for jass... Use call RemoveLocation(udg_TorrentTargetPoint[TorrentInstances])
 

Romek

Super Moderator
Reaction score
963
> Use call RemoveLocation(udg_TorrentTargetPoint[TorrentInstances])
Should be:
Use "call RemoveLocation(udg_TorrentTargetPoint[udg_TorrentInstances])"
 
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