Inverse Purge

HL.Clockwork

New Member
Reaction score
5
I would like to make a spell like inverse purge. Slowing the unit over time more and more until it is unable to move for 1 second.

Searched forums but cannot find anything about this.

thank for help :)
 

Samael88

Evil always finds a way
Reaction score
181
Please give a little better explanation of what you want. Not everyone here is fond of how purge work, and the other sentence there does not make any sense at all:confused:
 

HL.Clockwork

New Member
Reaction score
5
well purge reduces the movement speed to a minimum and then the unit regains x% of it speed back per second.

now i want an ability that slows the unit over x secs and the first second the speed ot set to 80% the next to 60% until 0%(stop) then regain full speed.
 

Samael88

Evil always finds a way
Reaction score
181
Have you tried changing some of the values of the spell to negative values. That can sometimes have unexpected results:) If that does not work, then trigger it.

Like having a dummy unit cast an ability on the unit that slows it for 80%
when the effect of that spell runs out, have another dummy cast a spell wich does 60% spell. and so on.. I hope you get what I mean:)
 

HL.Clockwork

New Member
Reaction score
5
Have you tried changing some of the values of the spell to negative values. That can sometimes have unexpected results:) If that does not work, then trigger it.

Like having a dummy unit cast an ability on the unit that slows it for 80%
when the effect of that spell runs out, have another dummy cast a spell wich does 60% spell. and so on.. I hope you get what I mean:)

got what u mean but my problem is, that it is for a TD so thats a tower skill, and u can build more then one tower. Dunno how to manage that much dummy casters and how to detect if a buff runs out?
 

lindenkron

You can change this now in User CP
Reaction score
102
I don't know if this is what you need.. You gave a rather vague discription :D

But anyway, try it. It's MUI, and leakless (Didn't really check.. but I'm pretty sure ;)) and should be pretty customizable .. not alot, since I just made it fast :p. You can decide how long it takes for the unit to each 0 speed (and thereby gain 100% movement speed back).

*REMEMBER* Change constants to Minimumspeed: 0, maximum speed: 522.

Code:
Trigger:
  • ReversePurge
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to ReversePurge
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MUI Less than or equal to 10
        • Then - Actions
          • Set MUI = (MUI + 1)
        • Else - Actions
          • Set MUI = 0
      • -------- Variables --------
      • Set OverTime = 10.00
      • Set Target[MUI] = (Target unit of ability being cast)
      • Set SpeedOverTime = ((Current movement speed of Target[MUI]) / (OverTime x 10.00))
      • Game - Display to (All players) the text: (String(SpeedOverTime))
      • -------- Dummy Unit Debuff --------
      • Set Location = (Position of Target[MUI])
      • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Location facing Default building facing degrees
      • Unit - Add Dummy Ability - ReversePurge to (Last created unit)
      • Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike Target[MUI]
      • Unit - Add a 3.00 second Water Elemental expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_Location)
      • -------- Dummy Unit --------
      • Set Location = (Position of (Triggering unit))
      • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Location facing Default building facing degrees
      • Unit - Set the custom value of (Last created unit) to MUI
      • Unit Group - Add (Last created unit) to ReversePurgeGroup
      • Custom script: call RemoveLocation (udg_Location)


Trigger:
  • ReversePurgeGO
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
      • (Number of units in ReversePurgeGroup) Greater than 0
    • Actions
      • Unit Group - Pick every unit in ReversePurgeGroup and do (Actions)
        • Loop - Actions
          • Set MUI_GO = (Custom value of (Picked unit))
          • Set Wait[MUI_GO] = (Wait[MUI_GO] + 0.10)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Wait[MUI_GO] Less than or equal to OverTime
              • (Current movement speed of Target[MUI_GO]) Greater than 0.00
            • Then - Actions
              • Unit - Set Target[MUI_GO] movement speed to ((Current movement speed of Target[MUI_GO]) - SpeedOverTime)
              • Game - Display to (All players) the text: (String((Current movement speed of Target[MUI_GO])))
            • Else - Actions
              • Unit - Set Target[MUI_GO] movement speed to (Default movement speed of Target[MUI_GO])
              • Unit Group - Remove (Picked unit) from ReversePurgeGroup
              • Set Wait[MUI_GO] = 0.00



have fun mate :thup:
-Lindenkron

--> Attached. (Attached map removed due to space needed)
 

HL.Clockwork

New Member
Reaction score
5
i ll check it out and btw lindenkron, i had a look @ your beam thing. Good job i ll answere via pm later :)
 

lindenkron

You can change this now in User CP
Reaction score
102
i ll check it out and btw lindenkron, i had a look @ your beam thing. Good job i ll answere via pm later :)

Okay :)

What this Reverse Purge does is:
Set the movementspeed of the unit every 0.10 sec to The movementspeed (Lets say its 300) of the unit, / with the amount of seconds it take (lets say its 10) / 10 (To get the 0.10 sec)

Meaning it would reduce enemy movementspeed by 3 per 0.10 sec, or 30 per second. Very gradual, so you wouldnt see major movement speed changes, just alittle at a time. When it hits 0 movementspeed, it goes back to the units default movement speed.

Hf :)
-Lindenkron

PS: Before copying, make sure you remove the "Display Text to all players". It was just to check if the speed was working properly :)
 

HL.Clockwork

New Member
Reaction score
5
something is am thinking about is a leak:

Code:
# -------- Dummy Unit --------
# Set Location = (Position of (Triggering unit))
# Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Location facing Default building facing degrees
# Unit - Set the custom value of (Last created unit) to MUI
# Unit Group - Add (Last created unit) to ReversePurgeGroup

is this unit removed somewhere?
 

lindenkron

You can change this now in User CP
Reaction score
102
No is it not. True, I did make it abit fast :)

Add a: Unit - Remove Picked unit from Game. here:

Trigger:
  • Else - Actions
    • Unit - Set Target[MUI_GO] movement speed to (Default movement speed of Target[MUI_GO])
    • Unit Group - Remove (Picked unit) from ReversePurgeGroup
    • Unit - Remove Picked unit from Game.
    • Set Wait[MUI_GO] = 0.00


Bottom of the last trigger :)
 
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