• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Repelling Bubble - v1.3

this spell was inspired by cedi:
http://www.hiveworkshop.com/forums/spells-569/arcania-zero-v0-01-a-143759/?prev=r%3D20%26page%3D2

see screenshot for tooltip

Features:
- probably highest performance possible with GUI
- MI (can be casted multiple times by a single unit)
- Efficient Index Recycling
- 3D-KnockBack
- pokemon-mew-vs-mewtwo-overkill-command ("-funtest")

04.04.2010:
Recoded everything to improve performance even further
actually I just merged the triggers and replaced locals with globals since I found out they are faster
04.04.2010:
forgot to turn off the trigger
04.04.2010:
added documentation again

Keywords:
Repelling Bouble, Repelling, Arcane, Bubble, D4RK_G4ND4LF, cedi, XAOS_WIZARD, knockback, indexing, orb
Contents

Repelling Bubble (Map)

Reviews
16 Dec 2011 Bribe: I'm gonna "highly recommend" this spell cause your GUI is boss. 19:31, 20th Sep 2009 The_Reborn_Devil: Triggering looks really nice. Good eye-candy as well. It's also a very original idea. I can't see any other option...

Moderator

M

Moderator

16 Dec 2011
Bribe: I'm gonna "highly recommend" this spell cause your GUI is boss.

19:31, 20th Sep 2009
The_Reborn_Devil:

Triggering looks really nice.
Good eye-candy as well.
It's also a very original idea.

I can't see any other option than approving this spell.
If you disagree you could PM me ^^

I Recommend this spell.
 
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Repelling Bubble
  • Actions
    • Set RB_Max = (RB_Max + 1)
    • Set RB_Unit[(RB_Max x 2)] = (Target unit of ability being cast)
    • Set RB_Unit[((RB_Max x 2) + 1)] = (Triggering unit)
    • Set RB_Duration[(RB_Max x 2)] = 0.00
    • -------- Duration --------
    • Set RB_Duration[((RB_Max x 2) + 1)] = 10.00
    • -------- Shell effect --------
    • Special Effect - Create a special effect attached to the origin of RB_Unit[(RB_Max x 2)] using Abilities\Spells\Undead\Darksummoning\DarkSummonTarget.mdl
    • Set RB_Effect[RB_Max] = (Last created special effect)
    • Trigger - Turn on RepellingBubbleLoop <gen>
  • Events
    • Time - Every 0.03 seconds of game time
  • Conditions
  • Actions
    • -------- Loop is used to process stuff for every casted instance --------
    • For each (Integer i) from 1 to RB_Max, do (Actions)
      • Loop - Actions
        • -------- Save caster in a non-array variable to make code faster, shorter and more readable --------
        • Set u = RB_Unit[(i x 2)]
        • -------- Increase duration --------
        • Set RB_Duration[(i x 2)] = (RB_Duration[(i x 2)] + 0.03)
        • -------- Check if the caster wasn't removed, is alive and duration is not over --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • u Not equal to No unit
            • (Life of u) Greater than 0.00
            • RB_Duration[(i x 2)] Less than RB_Duration[((i x 2) + 1)]
          • Then - Actions
            • -------- Save caster position --------
            • Set loc = (Position of u)
            • -------- Allowed targets and AoE --------
            • -------- Picks all enemys within range of caster --------
            • Unit Group - Pick every unit in (Units within 180.00 of loc matching ((((Matching unit) Not equal to u) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is in RB_Group) Equal to False))) and ((((Matching unit) is A flying unit) Equal to False) and ((((Matching un and do (Actions)
              • Loop - Actions
                • -------- Damage --------
                • Unit - Cause RB_Unit[((i x 2) + 1)] to damage (Picked unit), dealing 100.00 damage of attack type Spells and damage type Normal
                • -------- If damage did not kill the target it will be knocked back --------
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (Life of (Picked unit)) Greater than 0.00
                  • Then - Actions
                    • -------- Add to a group so units won't get knocked back twice --------
                    • Unit Group - Add (Picked unit) to RB_Group
                    • -------- By adding this skill it is possible to change a groud unit's flying height as if it was flying --------
                    • Unit - Add Storm Crow Form to (Picked unit)
                    • Unit - Remove Storm Crow Form from (Picked unit)
                    • -------- Move a location to the position of the target --------
                    • Custom script: call MoveLocation(udg_zLoc, GetUnitX(GetEnumUnit()), GetUnitY(GetEnumUnit()))
                    • -------- Get angle from caster to target --------
                    • Set a = (Angle from loc to zLoc)
                    • -------- New instance --------
                    • Set RBM_Max = (RBM_Max + 1)
                    • -------- Knockback starting distance --------
                    • Set RBM_Data[(RBM_Max x 10)] = 0.00
                    • -------- Knockback distance --------
                    • Set RBM_Data[((RBM_Max x 10) + 1)] = 600.00
                    • -------- Knockback speed --------
                    • Set RBM_Data[((RBM_Max x 10) + 2)] = 18.00
                    • -------- We calculate the movement speed in vertical and horizontal direction cause it never changes and so we can reuse it --------
                    • -------- Knockback x speed --------
                    • Set RBM_Data[((RBM_Max x 10) + 3)] = ((Cos(a)) x RBM_Data[((RBM_Max x 10) + 2)])
                    • -------- Knockback y speed --------
                    • Set RBM_Data[((RBM_Max x 10) + 4)] = ((Sin(a)) x RBM_Data[((RBM_Max x 10) + 2)])
                    • -------- Pullback speed --------
                    • Set RBM_Data[((RBM_Max x 10) + 5)] = 30.00
                    • -------- Knockback Height --------
                    • Set RBM_Data[((RBM_Max x 10) + 6)] = 300.00
                    • -------- Sfx starting counter --------
                    • Set RBM_Data[((RBM_Max x 10) + 7)] = 0.00
                    • -------- Sfx counter (effect will be created every time the loop counts from 0 to 4) --------
                    • Set RBM_Data[((RBM_Max x 10) + 8)] = 4.00
                    • -------- An empty slot for you to fill in something --------
                    • Set RBM_Data[((RBM_Max x 10) + 9)] = 1337.00
                    • -------- Target --------
                    • Set RBM_Unit[(RBM_Max x 2)] = (Picked unit)
                    • -------- Caster --------
                    • Set RBM_Unit[((RBM_Max x 2) + 1)] = RB_Unit[(i x 2)]
                  • Else - Actions
            • Custom script: call RemoveLocation(udg_loc)
          • Else - Actions
            • -------- Shift data to make trigger run faster --------
            • Special Effect - Destroy RB_Effect[i]
            • Set RB_Effect[i] = RB_Effect[RB_Max]
            • Set RB_Unit[(i x 2)] = RB_Unit[(RB_Max x 2)]
            • Set RB_Unit[((i x 2) + 1)] = RB_Unit[((RB_Max x 2) + 1)]
            • Set RB_Duration[(i x 2)] = RB_Duration[(RB_Max x 2)]
            • Set RB_Duration[((i x 2) + 1)] = RB_Duration[((RB_Max x 2) + 1)]
            • Set RB_Max = (RB_Max - 1)
            • Set i = (i - 1)
    • -------- Movement loop --------
    • For each (Integer i) from 1 to RBM_Max, do (Actions)
      • Loop - Actions
        • Set u = RBM_Unit[(i x 2)]
        • Set r = RBM_Data[((i x 10) + 2)]
        • -------- Check if the target did not die or got removed and if speed is not 0 --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • r Not equal to 0.00
            • u Not equal to No unit
            • (Life of u) Greater than 0.00
          • Then - Actions
            • -------- Get the x and y position of a unit --------
            • Custom script: set udg_x = GetUnitX(udg_u)
            • Custom script: set udg_y = GetUnitY(udg_u)
            • -------- If speed is positive the unit shall be moved foreward --------
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • r Greater than 0.00
              • Then - Actions
                • -------- Increase distance counter --------
                • Set RBM_Data[(i x 10)] = (RBM_Data[(i x 10)] + RBM_Data[((i x 10) + 2)])
                • -------- Current distance --------
                • Set r = RBM_Data[(i x 10)]
                • -------- Max distance --------
                • Set a = RBM_Data[((i x 10) + 1)]
                • -------- Check if max distance is not reached yet --------
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • r Less than a
                  • Then - Actions
                    • -------- Knockback effect --------
                    • Set s = Abilities\Weapons\GreenDragonMissile\GreenDragonMissile.mdl
                    • -------- Calculate new position --------
                    • Set x = (x + RBM_Data[((i x 10) + 3)])
                    • Set y = (y + RBM_Data[((i x 10) + 4)])
                    • -------- Check if new position is within map bounds --------
                    • Custom script: if RectContainsCoords(bj_mapInitialPlayableArea, udg_x, udg_y) then
                    • -------- Set unit position --------
                    • Custom script: call SetUnitX(udg_u, udg_x)
                    • Custom script: call SetUnitY(udg_u, udg_y)
                    • Custom script: endif
                    • -------- Set unit fly height according to parabola movement --------
                    • Animation - Change u flying height to ((((4.00 x RBM_Data[((i x 10) + 6)]) x r) x (a - r)) / (a x a)) at 0.00
                  • Else - Actions
                    • Set RBM_Data[((i x 10) + 2)] = (RBM_Data[((i x 10) + 5)] x -1.00)
              • Else - Actions
                • -------- Else the unit will be moved back to the caster --------
                • Set u2 = RBM_Unit[((i x 2) + 1)]
                • -------- Get x and y position of the caster --------
                • Custom script: set udg_x2 = GetUnitX(udg_u2)
                • Custom script: set udg_y2 = GetUnitY(udg_u2)
                • -------- Check if the distance between the caster and the target is bigger then 64^2 --------
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (((x - x2) x (x - x2)) + ((y - y2) x (y - y2))) Greater than 16384.00
                  • Then - Actions
                    • -------- Check if the distance between the caster and the target is bigger then 64^2 --------
                    • -------- Pullback effect --------
                    • Set s = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
                    • -------- Calculate angle --------
                    • Custom script: set udg_a = Atan2(udg_y-udg_y2, udg_x-udg_x2)
                    • -------- Move target to new position --------
                    • Custom script: call SetUnitX(udg_u, udg_x+Cos(udg_a)*udg_r)
                    • Custom script: call SetUnitY(udg_u, udg_y+Sin(udg_a)*udg_r)
                  • Else - Actions
                    • -------- Set speed to 0 which will make the movement end --------
                    • Set RBM_Data[((i x 10) + 2)] = 0.00
            • -------- Check sfx counter --------
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • RBM_Data[((i x 10) + 7)] Greater than or equal to RBM_Data[((i x 10) + 8)]
              • Then - Actions
                • -------- Create a special effect --------
                • Custom script: call DestroyEffect(AddSpecialEffectTarget(udg_s, udg_u, "origin"))
                • -------- Reset counter --------
                • Set RBM_Data[((i x 10) + 7)] = 0.00
              • Else - Actions
                • -------- Increase counter --------
                • Set RBM_Data[((i x 10) + 7)] = (RBM_Data[((i x 10) + 7)] + 1.00)
          • Else - Actions
            • -------- Use GUI movement to unstuck target --------
            • Set loc = (Position of RBM_Unit[((i x 2) + 1)])
            • Unit - Move u instantly to loc
            • Custom script: call RemoveLocation(udg_loc)
            • Animation - Change u flying height to 0.00 at 0.00
            • Unit Group - Remove u from RB_Group
            • Set RBM_Unit[(i x 2)] = RBM_Unit[(RBM_Max x 2)]
            • Set RBM_Unit[((i x 2) + 1)] = RBM_Unit[((RBM_Max x 2) + 1)]
            • For each (Integer i2) from 0 to 9, do (Actions)
              • Loop - Actions
                • Set RBM_Data[((i x 10) + i2)] = RBM_Data[((RB_Max x 10) + i2)]
            • Set RBM_Max = (RBM_Max - 1)
            • Set i = (i - 1)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • RBM_Max Less than 1
        • RB_Max Less than 1
      • Then - Actions
        • -------- Turn trigger off if nothing is to happen --------
        • Trigger - Turn off (This trigger)
      • Else - Actions
 
Last edited:
Level 10
Joined
Sep 21, 2007
Messages
517
you see gandalf this is a good spell, but the only problem with these types of Z movement spells is that unit may be stuck in an unpathable place after getting knocked there :/ as for efficiency, use globals for the loop, better if in an array, you dont need to creat elocals for just looping through indexes. i know this is overrated, but gj ^^
 
you see gandalf this is a good spell, but the only problem with these types of Z movement spells is that unit may be stuck in an unpathable place after getting knocked there :/ as for efficiency, use globals for the loop, better if in an array, you dont need to creat elocals for just looping through indexes. i know this is overrated, but gj ^^

units won't get stuck anywhere as long as the caster does not cause they will be moved back always (or at least they should do so)

I deleted the one with the mana drain effects cause I thought it wouldn't be unique enough and there were some unfixed issues anyway

edit:
globals appear to be a lot faster then locals so I replaced them
 
Last edited:
Level 10
Joined
Sep 21, 2007
Messages
517
if you make them arrayed globals then use [#] to set a limit for the global. Btw i really think u need to get ur resources from guys like vexorian or something, whos the guy at warcraft.de ?

globals preset values instead of constantly having to create them, they just insert them, so creating a local every time a spell is cast rather than setting it is slower :p tho i have a bad feeling about GUI globals hmm... prob just me lmao
 
Level 11
Joined
Apr 29, 2007
Messages
826
if you make them arrayed globals then use [#] to set a limit for the global. Btw i really think u need to get ur resources from guys like vexorian or something, whos the guy at warcraft.de ?

globals preset values instead of constantly having to create them, they just insert them, so creating a local every time a spell is cast rather than setting it is slower :p tho i have a bad feeling about GUI globals hmm... prob just me lmao
wow srsly, it does make a difference from lets say 0.0000000000000001 seconds.
 
anyways i just remembered you cant do that setting variable limit in GUI, hmm though i think u can in variable editor.

it's not the limit but the index until it will be set to some value which can be set there too

and jass globals are the same as GUI globals
at least it looks like that when exporting the script.j
 
Last edited:
Disculpa como puedo subir los niveles por ejemplo hacer la habilidad lvl 15 y restar los segundos por level de la habilidad

please translate that to english
the google translation does not make any sense at all
"Sorry as I can raise levels eg the ability to lvl 15 and subtracting the latter by the skill level"
 
Level 8
Joined
Jul 14, 2010
Messages
235
nice, but is there any way to make the units get blocked by trees and hills, so ppl dont get stuck in trees, and on top of hills? And remove the pullback effect, so units have to hit the target again to get knockbacked for the second time? Thanks
 
nice, but is there any way to make the units get blocked by trees and hills, so ppl dont get stuck in trees, and on top of hills? And remove the pullback effect, so units have to hit the target again to get knockbacked for the second time? Thanks

if the units are pulled back they won't get stuck

SetUnitPosition is too slow and item pathchecking is too unaccurate
 
Top