Spell Bouncy Ball

THE_X

New Member
Reaction score
49
Bouncy Ball

Sends a ball to a targeted location bouncing off walls, trees, and ground units, if it comes into contact with an enemy ground unit the unit will be pushed back and dealt damage

Ball lasts 10 seconds.


cant really get the effect with a screen shot :(

MUI/MPI - Both

GUI/Jass - GUI

Leakless - Think so, yea

Fun - Yeppers

Code:
Create Ball
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Bouncy Ball 
    Actions
        Set Point[1] = (Position of (Triggering unit))
        Set Point[2] = (Target point of ability being cast)
        Set Point[3] = (Point[1] offset by 60.00 towards (Angle from Point[1] to Point[2]) degrees)
        Set MUI = (MUI + 1)
        Unit - Create 1 Bouncy Ball for (Owner of (Triggering unit)) at Point[3] facing Point[2]
        Unit - Set the custom value of (Last created unit) to MUI
        Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
        Set Ball_Timer[(Custom value of (Last created unit))] = 10.00
        Set Ball_Caster[(Custom value of (Last created unit))] = (Triggering unit)
        Custom script:   call RemoveLocation (udg_Point[1])
        Custom script:   call RemoveLocation (udg_Point[2])
        Custom script:   call RemoveLocation (udg_Point[3])

Code:
Slide Ball
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Set Group[1] = (Units of type Bouncy Ball)
        Unit Group - Pick every unit in Group[1] and do (Actions)
            Loop - Actions
                Set Unit = (Picked unit)
                Set Point[1] = (Position of (Picked unit))
                Custom script:   set udg_Ball_Height[1] = GetLocationZ(udg_Point[1])
                Set Point[2] = (Point[1] offset by 6.00 towards (Facing of (Picked unit)) degrees)
                Custom script:   set udg_Ball_Height[2] = GetLocationZ(udg_Point[2])
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Ball_Height[2] Greater than or equal to (Ball_Height[1] + 3.50)
                    Then - Actions
                        Unit - Create 1 Bouncy Ball for (Owner of (Picked unit)) at Point[1] facing ((Facing of (Picked unit)) + ((Angle from Point[1] to Point[2]) x 2.00)) degrees
                        Unit - Add a Ball_Timer[(Custom value of (Picked unit))] second Generic expiration timer to (Last created unit)
                        Unit - Set the custom value of (Last created unit) to (Custom value of (Picked unit))
                        Unit - Remove (Picked unit) from the game
                        Special Effect - Create a special effect at Point[1] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                        Special Effect - Destroy (Last created special effect)
                    Else - Actions
                        Unit - Move (Picked unit) instantly to Point[2]
                        Destructible - Pick every destructible within 50.00 of Point[2] and do (Actions)
                            Loop - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        ((Picked destructible) is alive) Equal to True
                                        Or - Any (Conditions) are true
                                            Conditions
                                                (Destructible-type of (Picked destructible)) Equal to Summer Tree Wall
                                                (Destructible-type of (Picked destructible)) Equal to Ashenvale Tree Wall
                                                (Destructible-type of (Picked destructible)) Equal to Ashenvale Canopy Tree
                                                (Destructible-type of (Picked destructible)) Equal to Barrens Tree Wall
                                                (Destructible-type of (Picked destructible)) Equal to Barrens Canopy Tree
                                                (Destructible-type of (Picked destructible)) Equal to Black Citadel Tree Wall
                                                (Destructible-type of (Picked destructible)) Equal to Cityscape Fall Tree Wall
                                                (Destructible-type of (Picked destructible)) Equal to Cityscape Snowy Tree Wall
                                                (Destructible-type of (Picked destructible)) Equal to Cityscape Summer Tree Wall
                                                (Destructible-type of (Picked destructible)) Equal to Cityscape Winter Tree Wall
                                                (Destructible-type of (Picked destructible)) Equal to Cityscape Ruined Tree Wall
                                                (Destructible-type of (Picked destructible)) Equal to Dalaran Ruins Tree Wall
                                                (Destructible-type of (Picked destructible)) Equal to Dungeon Tree Wall
                                                (Destructible-type of (Picked destructible)) Equal to Felwood Tree Wall
                                                (Destructible-type of (Picked destructible)) Equal to Felwood Canopy Tree
                                                (Destructible-type of (Picked destructible)) Equal to Icecrown Tree Wall
                                                (Destructible-type of (Picked destructible)) Equal to Icecrown Canopy Tree
                                                (Destructible-type of (Picked destructible)) Equal to Northrend Canopy Tree
                                                (Destructible-type of (Picked destructible)) Equal to Fall Tree Wall
                                                (Destructible-type of (Picked destructible)) Equal to Northrend Tree Wall
                                                (Destructible-type of (Picked destructible)) Equal to Snowy Tree Wall
                                                (Destructible-type of (Picked destructible)) Equal to Outland Tree Wall
                                                (Destructible-type of (Picked destructible)) Equal to Ruins Tree Wall
                                                (Destructible-type of (Picked destructible)) Equal to Ruins Canopy Tree
                                                (Destructible-type of (Picked destructible)) Equal to Underground Tree Wall
                                                (Destructible-type of (Picked destructible)) Equal to Village Tree Wall
                                                (Destructible-type of (Picked destructible)) Equal to Village Tree Wall
                                    Then - Actions
                                        Set Point[3] = (Position of (Picked destructible))
                                        Unit - Create 1 Bouncy Ball for (Owner of Unit) at Point[1] facing ((Facing of Unit) + ((Angle from Point[2] to Point[3]) x 2.00)) degrees
                                        Unit - Add a Ball_Timer[(Custom value of Unit)] second Generic expiration timer to (Last created unit)
                                        Unit - Set the custom value of (Last created unit) to (Custom value of Unit)
                                        Unit - Remove Unit from the game
                                        Special Effect - Create a special effect at Point[1] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                                        Special Effect - Destroy (Last created special effect)
                                        Custom script:   call RemoveLocation (udg_Point[3])
                                    Else - Actions
                        Set Group[2] = (Units within 50.00 of Point[2] matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) is A ground unit) Equal to True)))
                        Unit Group - Pick every unit in Group[2] and do (Actions)
                            Loop - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        (Unit-type of (Picked unit)) Not equal to Bouncy Ball
                                    Then - Actions
                                        Set Point[3] = (Position of (Picked unit))
                                        Unit - Create 1 Bouncy Ball for (Owner of Unit) at Point[1] facing ((Facing of Unit) + ((Angle from Point[2] to Point[3]) x 2.00)) degrees
                                        Unit - Add a Ball_Timer[(Custom value of Unit)] second Generic expiration timer to (Last created unit)
                                        Unit - Set the custom value of (Last created unit) to (Custom value of Unit)
                                        Unit - Remove Unit from the game
                                        Special Effect - Create a special effect at Point[1] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                                        Special Effect - Destroy (Last created special effect)
                                        Custom script:   call RemoveLocation (udg_Point[3])
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                (Picked unit) Not equal to Ball_Target[(Custom value of Unit)]
                                                ((Picked unit) belongs to an enemy of (Owner of Unit)) Equal to True
                                            Then - Actions
                                                Unit - Create 1 Dummy for (Owner of Unit) at Point[2] facing Default building facing degrees
                                                Unit - Add Bouncy Ball Pushback  to (Last created unit)
                                                Unit - Set level of Bouncy Ball Pushback  for (Last created unit) to (Level of Bouncy Ball  for Ball_Caster[(Custom value of Unit)])
                                                Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
                                                Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
                                                Set Ball_Target[(Custom value of Unit)] = (Picked unit)
                                            Else - Actions
                                    Else - Actions
                        Custom script:   call DestroyGroup (udg_Group[2])
        Set Unit = No unit
        Custom script:   call RemoveLocation (udg_Point[2])
        Custom script:   call RemoveLocation (udg_Point[1])
        Custom script:   call DestroyGroup (udg_Group[1])



Code:
Slide Ball Target
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        Set Group[1] = (Units in (Playable map area) matching (((Matching unit) has buff Bouncy Ball ) Equal to True))
        Unit Group - Pick every unit in Group[1] and do (Actions)
            Loop - Actions
                Set Point[1] = (Position of (Picked unit))
                Set Point[2] = (Point[1] offset by 4.00 towards (180.00 + (Facing of (Picked unit))) degrees)
                Unit - Move (Picked unit) instantly to Point[2]
                Special Effect - Create a special effect at Point[2] using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
                Special Effect - Destroy (Last created special effect)
        Custom script:   call DestroyGroup (udg_Group[1])
        Custom script:   call RemoveLocation (udg_Point[1])
        Custom script:   call RemoveLocation (udg_Point[2])

Code:
Ball Timer
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Set Group[1] = (Units of type Bouncy Ball)
        Unit Group - Pick every unit in Group[1] and do (Actions)
            Loop - Actions
                Set Ball_Timer[(Custom value of (Picked unit))] = (Ball_Timer[(Custom value of (Picked unit))] - 1.00)
        Custom script:   call DestroyGroup (udg_Group[1])


Code:
Remove Balll
    Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Triggering unit)) Equal to Bouncy Ball
    Actions
        Unit - Remove (Triggering unit) from the game
 

Attachments

  • Bouncy Ball v1.2.w3x
    31.7 KB · Views: 303

shinami

Redirect your complaints to the nearest wall
Reaction score
47
I don't know probably this is a bug but somehow the ball got behind me and when i walked it just created ALOT of thunderclaps at my place ( about my place ).. Cant show you the screenshot.. somehow can't host it.

Overall a very good spell.. You could make a decent volley ball map out of it :)
 

THE_X

New Member
Reaction score
49
The thunderclaps means theres quite a bit of balls being created :eek: but all you would have to do is walk out, its not gonna change anything, i made it so if it gets stuck in between a unit and a wall it wont hurt it more than once until it bounces off another unit so it cant insta kill that unit
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
i found a bug i think
i just shot the ball in the direction of an tree and that happened:
wc3scrnshot072908082504fo8.jpg
 

shinami

Redirect your complaints to the nearest wall
Reaction score
47
Exactly the same thing that happened to me when i got infront of the ball with kael.
 

THE_X

New Member
Reaction score
49
I'll fix it tomorrow, right now i am so tired :p thanks for the feedback
 

Tukki

is Skeleton Pirate.
Reaction score
29
Okey so I tried the spell, and hey it's nice - only that you leaks a load of locations and the bug some other ppl mentioned :p.

In the 'Slide Ball' trigger - move those 'call RemoveLocation' functions inside the loop, or you'll only destroy 2 of them. The same thing applies to the 'Slide Ball Target' trigger, move those functions!

Else it was a nice spell - except the bug and those leaks :).
 

R@i_no_Wyrm

New Member
Reaction score
43
It is sure a neat and funny spell! You just lack the bug and... (im using WC 1.21) i can't understand your array.

another bug (maybe becoz version difference) is that the ball will last indefinitely if you cast 2 balls and both bounces at least once. Only 1 ball will disappear.

Hey, can you make the ball lower? not make any sense coz i think it's high there but it hit me :p
 

THE_X

New Member
Reaction score
49
ok i fixed the bugs :D and for the trees thing i made it so that the ball destroys the tree when it hits it, i had anothyer way to make it just bouce off it and be fixed but i like the tree being destroyed better :D

Fixes:

-Ball no longer stays after 2 casts it will die when suppose to
-Units slide the angle they were hit, not the facing angle
-The tree bug no longer exists
 

XxShadyxX

I abused the rep system.
Reaction score
81
Hey I found a new bug... if you target the point for it to go rihgt on you th ball will stay there and make all these special effects can you fix this? also for Magic Wars! can we have less special effects for this spell or make it less laggier? It lags alot
 

Daskunk

SC2 Forum MVP - TheSkunk #386
Reaction score
186
Change "Art - Shadow Image (Unit)" to flyer instead of normal, it looks much better that way.

Other then that, I like it! Gets laggy after not too many balls at a time, though...


EDIT: If it gets stuck between two things it creates the effect tons. Maybe make it have to wait a small amount before creating a effect when hitting the exact same point twice? If you can do that.

EDIT2: Btw, this is with newest version:
 

Attachments

  • Bug1.jpg
    Bug1.jpg
    428.9 KB · Views: 397

THE_X

New Member
Reaction score
49
i could make a bounce limit. where the ball will last 25 seconds or for (blank) number of bounces, that will cut down on it getting stuck and making lag lots. other than that theres nothing i can do about it getting stuck, you could easly remove the special effect :/

Edit: woo 1k posts, also how can i get myself a siginature? do i have to have like a certian number of rep points?
 

quraji

zap
Reaction score
144
Good job, it's a neat spell.

It's also fun to annihilate the WC3 engine with.

For whatever reason, I had an urge to really abuse the hell out of this spell, so I made a trigger to auto-cast it as well as display how many balls were cast.

The game was doing fine up to about 100 balls, when it started lagging some. No problem, I was still at ~25 FPS
BB_100.jpg

At 230+ balls, my FPS dropped to ~1. Also, the caster's head seemed to implode and form a singularity into which he and everything around him was sucked.
BB_233.jpg

This is when I remembered to pull up Task Manager to check the CPU and memory usage. Notice also how Warcraft pretty much craps out and stops displaying most of the effects and models:
BB_660k.jpg

I had stopped spawning balls at around 230 balls, but the memory usage steadily climbed. Warcraft was determined to make use of as much memory as it could. I decided to let it be, and made myself a sandwich. Upon returning, I noticed that the memory usage was still climbing. At this point I had to take care of something, so I took a screenshot and left. When I returned the memory usage had fallen to about ~400,000K.
Here's the last screenshot:

919,640 kilobytes = ~898 megabytes = ~.88 gigabytes
BB_919k.jpg



So once again, thank you for your spell, I'm amused :thup:

(Note: These screenshots were NOT taken under anything even close to normal circumstances. Do not think this is a laggy or bad spell! I specifically spawned excess instances of this spell on purpose!)
 

THE_X

New Member
Reaction score
49
well im just happy i can cast it over 50, with my new labtop, is the shizz, thanks for the comments, and if you were gonna use this in a map, i dont think you would have over lets say how ever many players there are giving its an AoS map and everyone has the same hero, so at max il say 2 balls on the map at the same time, not to bad :D



Edit: Map updated agian,

Changes:

-Much, much less laggy, i changes times from .01 to .03 on ball and .04 on units
-Changed the art of the ball bouncing
-Ball hits trees more easly now
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
hm why are you removing the ball twice? (expiration timer/ with the custom value)
 

THE_X

New Member
Reaction score
49
i remove the ball to get the effect that it turns instantly, also i need to update my codes i have not done that yet :(
 

THE_X

New Member
Reaction score
49
well easly you just gotta move lol but if i were to change it, then the angles would not be perfect :( trig ftw!!
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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