• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Toss 1.03

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
I just saw toss on Dota and decided to make it, completely on my own. What it does is tosses a random nearby unit to the target.

Changelog (1.01)
Changes = Change aoe around the unit 200 -> 250
Changed the text to show above the unit
Changed the icon, Credits for icon : CRAZYRUSSIAN
Changed default speed 20 -> 30
Changelog (1.02)
Changed the animation for originality
Still triangular :(
Changed icon to blizzard "Target Ground"
Added a better map for testing
Changed 0.02 -> 0.03
Removed Several Leaks(if you notice any i missed please tell me)
Added -camera and -speed commands
Toss only grabs living units and only damages enemy units.
Made it so when the target blinks, it doesn't follow them
Changelog (1.03)
I made the toss a parabole, but it doesn't look much different, i think i did something wrong with the equation.
I made the map slightly better for testing
I changed the toss range to 1200 from 4000.
I havnt made it MUI yet.


  • Toss Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Toss
    • Actions
      • Set Tosser = (Triggering unit)
      • Set TosserPoint = (Position of Tosser)
      • Set Tossable = (Units within 250.00 of TosserPoint matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A ground unit) Equal to True)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Tossable) Greater than 1
        • Then - Actions
          • -------- Setting Variables --------
          • Unit Group - Remove Tosser from Tossable
          • Set Tossee = (Random unit from Tossable)
          • Unit Group - Pick every unit in Tossable and do (Unit Group - Remove (Picked unit) from Tossable)
          • Set TossTarget = (Target unit of ability being cast)
          • Set TossDistance = (Integer((Distance between (Position of Tossee) and (Position of TossTarget))))
          • Set TossMidDistance = (TossDistance / 2)
          • Set TossTargetPoint = (Position of TossTarget)
          • Set TosseePoint = (Position of Tossee)
          • -------- Tossing him --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Tossee Equal to TossTarget
            • Then - Actions
              • Unit - Add Crow Form to Tossee
              • Unit - Remove Crow Form from Tossee
              • Unit - Turn collision for Tossee Off
              • Unit - Pause Tossee
              • Special Effect - Create a special effect attached to the head of Tossee using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
              • Set TossFire = (Last created special effect)
              • Animation - Change Tossee flying height to 700.00 at 2500.00
              • Wait 0.25 seconds
              • Unit - Turn collision for Tossee On
              • Unit - Unpause Tossee
              • Animation - Change Tossee flying height to 0.00 at 2500.00
              • Wait 0.10 seconds
              • Set Targets = (Units within 250.00 of TosseePoint matching ((((Matching unit) belongs to an enemy of (Owner of Tosser)) Equal to True) and (((Matching unit) is A ground unit) Equal to True)))
              • Unit Group - Pick every unit in Targets and do (Actions)
                • Loop - Actions
                  • Special Effect - Create a special effect at TosseePoint using Abilities\Spells\Other\Volcano\VolcanoDeath.mdl
                  • Unit - Cause Tosser to damage (Picked unit), dealing 300.00 damage of attack type Spells and damage type Fire
              • Unit - Cause Tosser to damage Tossee, dealing 150.00 damage of attack type Spells and damage type Fire
              • Special Effect - Destroy TossFire
            • Else - Actions
              • Unit - Add Crow Form to Tossee
              • Unit - Remove Crow Form from Tossee
              • Unit - Turn collision for Tossee Off
              • Special Effect - Create a special effect attached to the head of Tossee using Doodads\Cinematic\TownBurningFireEmitter\TownBurningFireEmitter.mdl
              • Set TossFire = (Last created special effect)
              • Unit - Pause Tossee
              • Trigger - Turn on Toss Move <gen>
        • Else - Actions
          • Floating Text - Create floating text that reads No valid unit to to... above Tosser with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Set FloatingText = (Last created floating text)
          • Floating Text - Change FloatingText: Disable permanence
          • Floating Text - Change the lifespan of FloatingText to 2.00 seconds
          • Floating Text - Change the position of FloatingText to Tosser with Z offset 0.00

  • Toss Move
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- Blinked? --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Blinked[(Player number of (Owner of TossTarget))] Equal to True
        • Then - Actions
        • Else - Actions
          • Set TossTargetPoint = (Position of TossTarget)
      • -------- Setting Variables --------
      • Set TosseePoint = (Position of Tossee)
      • Set TossOffset = ((Distance between TossTargetPoint and TosseePoint) - (Real(TossSpeed)))
      • Set TossAngle = (Angle from TossTargetPoint to TosseePoint)
      • Unit - Move Tossee instantly to (TossTargetPoint offset by TossOffset towards TossAngle degrees)
      • Set TosseePoint = (Position of Tossee)
      • Set TosseeHeight = (Current flying height of Tossee)
      • Set TossRemainingDistance = (Distance between TossTargetPoint and TosseePoint)
      • -------- Parabola Variables --------
      • Set TossHeight = (((500.00 / (Real(TossMidDistance))) x (Power((TossRemainingDistance - (Real(TossMidDistance))), 2.00))) + 500.00)
      • If (TossRemainingDistance Less than or equal to (Real(TossMidDistance))) then do (Set TossHeight = ((1.00 / TossHeight) x -1.00)) else do (Do nothing)
      • Animation - Change Tossee flying height to TossHeight at 2000.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Integer(TossRemainingDistance)) Less than 70
        • Then - Actions
          • Unit - Unpause Tossee
          • Unit - Turn collision for Tossee On
          • Animation - Change Tossee flying height to 0.00 at 1500.00
          • Special Effect - Create a special effect at TosseePoint using Abilities\Spells\Other\Volcano\VolcanoDeath.mdl
          • Set Targets = (Units within 250.00 of TosseePoint matching ((((Matching unit) belongs to an enemy of (Owner of Tosser)) Equal to True) and (((Matching unit) is A ground unit) Equal to True)))
          • Unit Group - Pick every unit in Targets and do (Actions)
            • Loop - Actions
              • Special Effect - Create a special effect at TosseePoint using Abilities\Spells\Other\Volcano\VolcanoDeath.mdl
              • Unit - Cause Tosser to damage (Picked unit), dealing 300.00 damage of attack type Spells and damage type Fire
          • Special Effect - Destroy TossFire
          • Set Blinked[(Player number of (Owner of Tossee))] = False
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Do nothing
Keywords:
Toss, Tiny, DotA
Contents

Toss 1.01 (Map)

Reviews
12th Dec 2015 IcemanBo: Too long time as NeedsFix. Rejected. 14:19, 19th Oct 2010 The_Reborn_Devil: This spell still isn't MUI nor MPI. You also have leaks and you don't need the "Do Nothing". I would highly recommend looking at the GUI...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long time as NeedsFix. Rejected.

14:19, 19th Oct 2010
The_Reborn_Devil:

This spell still isn't MUI nor MPI. You also have leaks and you don't need the "Do Nothing".

I would highly recommend looking at the GUI tutorials we have here to learn about leaks, unit groups and how to make MUI spells.

Leaks (memory leaks) occur when you forget to remove certain things like locations that you create. "(Position of TossTarget)" creates a new location and to avoid a leak you need to remove it. This can be done by storing it in a variable and then using custom script to remove it. You must also remember to destroy unit groups after you're done with them.


Status: Rejected until updated
Rating: N/A

PM me or another mod once you've updated this to get it reviewed again. Have a nice day!
 
Level 13
Joined
Mar 13, 2010
Messages
1,172
Testing now.....

EDIT: unfortunatly there are quite a few problems that need to be addressed, I don't know very much about triggers/spells but I know enough to know that there are issues. Sorry :(
 
Level 2
Joined
Aug 6, 2010
Messages
3
• Not MUI.
• Displays the error message to all players.
• Uses begins casting an ability.
• Stupid icon?
• That Toss is very.. triangular.
• Location Leak abundance.
i didnt make the icon, i just grabed a random one because its not about the icon ... and i dont know how to make it any other way, can you help me make it better?
edit: I fixed the icon, and the text message, I don't know what you mean by triangular. "Location Leak Abundance." What does this mean. Sorry i'm new to this and i want to learn.

Can you post the triggers here for us to see?
i just copied and pasted the triggers, idk the proper way to do it but there ya go.

No comment this is a terribly bad
Explain why its bad, don't say no comment then add an offensive comment.

Wow , don't triple post use edit button.....
There i used to edit button, my first spell, im learning :) can you give me any other tips?

3 reasons why this user needs some private instructions on how to act in a forum. Reason 1. he does not read the rules (non-mui spell etc) Reason 2. he triple posted. Reason 3. it helps him in a long run.
I just went and re-read it now, i know i should of did it earlier. i actually did try to make it MUI but the trigger didn't work, i don't know how to make this kind of spell MUI.

Use trigger tags around the triggers you posted...
[TRIGGER and /TRIGGER]

learn hashtables or indexing or structs
(you can use the tutorials section to learn

Comments on the spell:

-Spell is not MUI-
-I suggest changing the .02 seconds to .03-
-uses waits, changed that-
-Dont use imported materials if not badly needed-

Location Leak Abundance means that your spell leaks many locations... Go to the tutorials section to learn about leaks...

Toss is triangular - I think he means that your toss forms a triangle instead of an arc...

Note: maybe add some more originality, coz some people dislike replicated DotA spells... you can add a stun effect or something else...
Thanks a lot, ill do changes asap, ill read the tutorials, and learn how to arc instead of triangular. Ill try to get a blizzard icon as well, and originality.

I'm not sure but I do believe that in Dota, this skill doesn't pick unit randomly but it pick the nearest unit. If it pick random unit in area, this skill will be a garbage skill that no one want to play because of its difficulty to use. (In playing there are usually 2-4 unit in 250 within casting area so it will be only 25% to pick the specific unit)

Hope fix. Will rate after update. + Will be pleased if you correct me if I'm wrong
Sorry but you are wrong, in DotA it grabs a "Nearby Unit" it doesn't state that it is grabing the closest unit, and i know for a fact that it doesn't grab the closest unit because I've played Tiny several times.

well apart from the obvious which has already been said, all I have really to say it to use a parabola for a much smoother effect

to work out a parabola you need to do the following formula:

(4 * Max height of parabola / Max distance) * (Max distance - currant distance) * (Currant distance / Max distance) = Currant fly height

so more or less, everytime you move the unit using the loop you set variables to how far it's moved and when it's cast you set how high u want the unit go and how far it'll go as a total. then set a variable to the above formula then set the units fly height to the variable and you're effect will be so much smoother.
I tried using the formula, and I think i did something wrong because it didn't work. Max height of parabola. is that the max height that i choose? i chose 700.
  • Animation - Change Tossee flying height to ((4.00 x ((Real(TossHeight)) / (Real(TossDistance)))) x (((Real(TossDistance)) - (Distance between TosserPoint and (Position of TossTarget))) x ((Distance between TosserPoint and (Position of TossTarget)) / (Distance between TosserPoint and TossTargetPoint))) at 1500.00
Edit: I learnt how to do parabolas in school now, so i have a better understanding of it, and i took the formula that he gave me and attempted to use it, it worked, but i'm sure that your formula is much better if i understood it, thanks anyways.
  • Set TossHeight = (((500.00 / (Real(TossMidDistance))) x (Power((TossRemainingDistance - (Real(TossMidDistance))), 2.00))) + 500.00)
  • If (TossRemainingDistance Less than or equal to (Real(TossMidDistance))) then do (Set TossHeight = ((1.00 / TossHeight) x -1.00)) else do (Do nothing)
please put a changelog so that we'll easily know what you changed with each updates...
Lol, i have a changelog, i've had one since 1.01. Please don't post useless comments :p
 
Last edited:
Use trigger tags around the triggers you posted...
[TRIGGER and /TRIGGER]

learn hashtables or indexing or structs
(you can use the tutorials section to learn

Comments on the spell:

-Spell is not MUI-
-I suggest changing the .02 seconds to .03-
-uses waits, changed that-
-Dont use imported materials if not badly needed-

Location Leak Abundance means that your spell leaks many locations... Go to the tutorials section to learn about leaks...

Toss is triangular - I think he means that your toss forms a triangle instead of an arc...

Note: maybe add some more originality, coz some people dislike replicated DotA spells... you can add a stun effect or something else...
 
Level 4
Joined
Jul 24, 2010
Messages
85
Unit Group - Add all units of (Units within 250.00 of (Position of Tosser)) to Tossable
Unit Group - Remove Tosser from Tossable
Set Tossee = (Random unit from Tossable)

I'm not sure but I do believe that in Dota, this skill doesn't pick unit randomly but it pick the nearest unit. If it pick random unit in area, this skill will be a garbage skill that no one want to play because of its difficulty to use. (In playing there are usually 2-4 unit in 250 within casting area so it will be only 25% to pick the specific unit)

Hope fix. Will rate after update. + Will be pleased if you correct me if I'm wrong
 
well apart from the obvious which has already been said, all I have really to say it to use a parabola for a much smoother effect

to work out a parabola you need to do the following formula:

(4 * Max height of parabola / Max distance) * (Max distance - currant distance) * (Currant distance / Max distance) = Currant fly height

so more or less, everytime you move the unit using the loop you set variables to how far it's moved and when it's cast you set how high u want the unit go and how far it'll go as a total. then set a variable to the above formula then set the units fly height to the variable and you're effect will be so much smoother.
 
Level 13
Joined
Mar 13, 2010
Messages
1,172
Testing the map, It gets a little annoying because as soon as the map begins, you are surrounded by many wolves and its hard to get out of all the chaos! your mountain giants die too fast, and there are too many of them as well. Everything keeps dieng and resurecting, and its hard to test it.

Make the map bigger, then make some acceptable terrain, then make two mountain giants to test with, make it that they have 100000000 health, with 10000000 hp regeneration, and give them the ability of course. Then make groups of creeps around the map that resurect if killed, after a few seconds. Don't make them start where you do, just nearby. That way its easier on all of us :)

Heres a small example: http://www.hiveworkshop.com/forums/spells-569/fan-knives-v1-1-a-146574/?prev=search%3Dfan%26d%3Dlist%26r%3D20

Just some advice, you don't have to listen to me.
 
Level 4
Joined
Jul 24, 2010
Messages
85
I would suggest you to make it MUI FIRST <<<<<< before update anything else

Or... you will have a terrible dream at the end with the hundred of variables waiting for you.

Besure to remove leak before doing anything else. (Or it will stack up which is hard to solve)
Point >> Leak (call RemoveLocation)
UnitGroup >> Leak (call DestroyGroup)
Special effect >> Leak (MUST always destroy after creating them)

If you don't really know where is leak, go here. http://www.hiveworkshop.com/forums/tools-560/leak-check-1-3-a-62951/
 
Level 11
Joined
Jan 25, 2009
Messages
572
underground, To be honest, there is no easy way to get it MUI or MPI with Waits. You do need to create a way around the waits. Meaby a loop trigger which adds the time to a variable and a condition to checks if the time is equal to the ordinary wait time. That's the easiest way I know.
 
Top