Spell Polarity Shift

dragonhord

Knowledge is true opinion. - Plato
Reaction score
82
A spell I made in my spare time, and is set up as follows.
Leakless as far as I know.
NOT MUI.
Fun to use :p .
Written in GUI.
To import simply copy the spell from the object editor, and afterwards copy the folder "Polarity Shift" which contains all the triggers for the spell, then paste both of these into your map.

The hero bashes the ground with his hammer shifting outlying units into the center while creating a crater in the ground. Upon impact units around the caster are stunned.
PolarityShift.jpg
 

Attachments

  • Polarity Shift.w3x
    20.6 KB · Views: 605

elmstfreddie

The Finglonger
Reaction score
203
Like it except there's a leak :O
Code:
Polarity Shift Pull In
    Events
        Time - Every 0.09 seconds of game time
    Conditions
    Actions
        Set PolarityGroup = (Units within 500.00 of PolarityShiftPoint matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an ally of (Owner of PolarityShiftCaster)) Equal to False)))
        Unit Group - Pick every unit in PolarityGroup and do (Actions)
            Loop - Actions
                Set PolarityShiftTarget = (Picked unit)
                Set faceangle = ((Angle from PolarityShiftPoint to (Position of PolarityShiftTarget)) - 180.00)
                Special Effect - Create a special effect attached to the origin of PolarityShiftTarget using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
                Special Effect - Destroy (Last created special effect)
                Unit - Cause PolarityShiftCaster to damage PolarityShiftTarget, dealing (3.00 + (1.00 x (Real((Level of Unknown (A08S) for PolarityShiftCaster))))) damage of attack type Spells and damage type Normal
                Set Temp_Point = ((Position of PolarityShiftTarget) offset by 5.00 towards faceangle degrees)
                Unit - Move PolarityShiftTarget instantly to Temp_Point, facing faceangle degrees
        Custom script:   call DestroyGroup(udg_PolarityGroup)
        [B]Custom script:   call RemoveLocation(udg_Temp_Point)[/B]

The bolded text should be inside the unit group loop :eek:
 

dragonhord

Knowledge is true opinion. - Plato
Reaction score
82
Point taken =/ Ehe, thats a leak or two :p Lemme fix that right now. Thanks.
 

Tinki3

Special Member
Reaction score
418
Found a few more leaks.

Please look at the text in bold:
Code:
Polarity Shift
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Polarity Shift 
    Actions
        Set PolarityShiftCaster = (Casting unit)
        Set PolarityShiftPoint = (Position of PolarityShiftCaster)
        Environment - Create a 0.01 second Permanent crater deformation at PolarityShiftPoint with radius 400.00 and depth 400.00
        [B]Environment - Create a 0.50 second wave deformation from PolarityShiftPoint to (PolarityShiftPoint offset by 256.00 towards 360.00 degrees) with radius 256.00, depth 96.00, and a 0.00 second trailing delay[/B]
        Trigger - Turn on Polarity Shift Pull In <gen>
        Wait 5.00 seconds
        Trigger - Turn off Polarity Shift Pull In <gen>
        Environment - Create a 3.00 second Permanent crater deformation at PolarityShiftPoint with radius 400.00 and depth -400.00
        Custom script:   call RemoveLocation(udg_PolarityShiftPoint)
Environment - Create a 0.50 second wave deformation from PolarityShiftPoint to (PolarityShiftPoint offset -> This leaks a polar offset. Set the polar projection data into a variable like so:

Set Temp_Point = (PolarityShiftPoint offset by 256.00 towards 360.00 degrees)

Then use "Temp_Point" as the point to create the effect at.
You'll also need to remove Temp_Point immediately after use, preferably just before
you turn on the periodic trigger.

Code:
Polarity Shift Pull In
    Events
        Time - Every 0.09 seconds of game time
    Conditions
    Actions
        Set PolarityGroup = (Units within 500.00 of PolarityShiftPoint matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an ally of (Owner of PolarityShiftCaster)) Equal to False)))
        Unit Group - Pick every unit in PolarityGroup and do (Actions)
            Loop - Actions
                Set PolarityShiftTarget = (Picked unit)
                Set faceangle = ((Angle from PolarityShiftPoint to (Position of PolarityShiftTarget)) - 180.00)
                Special Effect - Create a special effect attached to the origin of PolarityShiftTarget using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
                Special Effect - Destroy (Last created special effect)
                [B]Unit - Cause PolarityShiftCaster to damage PolarityShiftTarget, dealing (3.00 + (1.00 x (Real((Level of Unknown (A08S) for PolarityShiftCaster))))) damage of attack type Spells and damage type Normal[/B]
                [B]Set Temp_Point = ((Position of PolarityShiftTarget) offset by 5.00 towards faceangle degrees)[/B]
                Unit - Move PolarityShiftTarget instantly to Temp_Point, facing faceangle degrees
                Custom script:   call RemoveLocation(udg_Temp_Point)
        Custom script:   call DestroyGroup(udg_PolarityGroup)
(Real((Level of Unknown (A08S) for PolarityShiftCaster))) -> "A08S" needs to be replaced with the Polarity Shift ability :)

(Position of PolarityShiftTarget) offset by 5.00 towards faceangle degrees -> This leaks twice. You need to initially set the position of the PolarityShiftTarget into a variable, and then set another variable with the polar projection data (Italic = new/modified):
Code:
Unit Group - Pick every unit in PolarityGroup and do (Actions)
    Loop - Actions
        Set PolarityShiftTarget = (Picked unit)
        [I]Set Temp_Point[1] = Position of PolarityShiftTarget
        Set faceangle = ((Angle from PolarityShiftPoint to Temp_Point[1] - 180.00)
        Set Temp_Point[2] = Temp_Point[1] offset by 5.00 towards faceangle degrees)[/I]
        Special Effect - Create a special effect attached to the origin of PolarityShiftTarget using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
        Special Effect - Destroy (Last created special effect)
        [I]Unit - Cause PolarityShiftCaster to damage PolarityShiftTarget, dealing (3.00 + (1.00 x (Real((Level of Polarity Shift for PolarityShiftCaster))))) damage of attack type Spells and damage type Normal[/I]
        [I]Unit - Move PolarityShiftTarget instantly to Temp_Point[2], facing faceangle degrees[/I]
     [I]   Custom script:   call RemoveLocation(udg_Temp_Point[1])
        Custom script:   call RemoveLocation(udg_Temp_Point[2])[/I]

Good work on the spell btw ;)
 

dragonhord

Knowledge is true opinion. - Plato
Reaction score
82
>(Position of PolarityShiftTarget) offset by 5.00 towards faceangle degrees -> This leaks twice. You need to initially set the position of the PolarityShiftTarget into a variable, and then set another variable with the polar projection data (Italic = new/modified):

I honestly didnt know that, I thought putting the whole thing in there eliminated leaks, which means that my maps movement triggers on my other spells leak -_-. Oh boy! Least I know now, thanks Tinki. Lemme fix it.
Edit - Should be fixed now...
 

Sim

Forum Administrator
Staff member
Reaction score
534
> Set faceangle = ((Angle from PolarityShiftPoint to (Position of PolarityShiftTarget)) - 180.00)

This leaks a point too :)
 

Hero

─║╣ero─
Reaction score
250
Is this a dota spell?

Anyways yours looks better than DotAs

I like it...well from the screen shot...when I get home I well test it and stuff...


*Subscribed
 

dragonhord

Knowledge is true opinion. - Plato
Reaction score
82
> Set faceangle = ((Angle from PolarityShiftPoint to (Position of PolarityShiftTarget)) - 180.00)

This leaks a point too :)

Is it? That means gg for my map then... So much fixing to do now... I have like 30 movement spells... (WAY Overexagerating but still -_- a lot) so woohoo work! I guess its time to fix it...
 

Hero

─║╣ero─
Reaction score
250
Is it? That means gg for my map then... So much fixing to do now... I have like 30 movement spells... (WAY Overexagerating but still -_- a lot) so woohoo work! I guess its time to fix it...

Learn JASS ^^

it is much easier to fix
 

dragonhord

Knowledge is true opinion. - Plato
Reaction score
82
Is Approval good? Lol, I can only assume it is so thank you :D . Anyhow, any more comments?
 

dragonhord

Knowledge is true opinion. - Plato
Reaction score
82
Is this a dota spell?

Anyways yours looks better than DotAs

I like it...well from the screen shot...when I get home I well test it and stuff...


*Subscribed
No it's not a DotA spell, I try to keep my spells so that they are actually my spells :p.
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
nice ^^ +rep
__________________
3 days ...no mod checked my spell -_-
 

WarLuvr3393

Hmmm...too many things to play (WoW, COD4, WC3)
Reaction score
54
Very cool spell. Just make sure those leaks are fixed or it won't be used in maps.

You have my +rep, gratz.

~WarLuvr
 

elmstfreddie

The Finglonger
Reaction score
203
Did I +rep you?
I forget.
It won't let me +rep the same post twice so if I haven't added rep yet I will now :O
I liked it, I was just tired when I first looked at it:p

Edit > Nope! Already repped :p
 

Hero

─║╣ero─
Reaction score
250
Expect a better report from me either tomorrow, Tuesday, or Wednesday

I am going home tomorrow.. :D
 

dragonhord

Knowledge is true opinion. - Plato
Reaction score
82
>Very cool spell. Just make sure those leaks are fixed or it won't be used in maps.

They are fixed :D . There were like 20 of em I didnt even know were leaks but I fixed them now haha. And thx for the +rep guys :D .
 
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