• 🏆 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!

Help with Barrier Ability

Status
Not open for further replies.
Level 8
Joined
Jun 26, 2019
Messages
318
Hello all. I need help how to get this to be as buff barrier. I want this Wrap Field ability to be stay following the unit who casted this Wrap Field as buff barrier, you know? Because I want this unit to be able to push the enemy units.

  • Warp Field
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in Region 001 <gen>) and do (Actions)
        • Loop - Actions
          • Set Warper = (Picked unit)
          • Set WarperCastPoint = (Position of (Picked unit))
          • For each (Integer A) from 1 to 36, do (Actions)
            • Loop - Actions
              • Unit - Create 1 Dummy for (Owner of Warper) at WarperCastPoint facing ((Real((Integer A))) x 10.00) degrees
              • Set barrier[(Integer A)] = (Last created unit)
              • Sound - Play BlinkArrival1 <gen> at 100.00% volume, attached to (Last created unit)
      • Trigger - Turn on Warping <gen>
      • Wait 30.00 seconds
      • Trigger - Turn off Warping <gen>
      • For each (Integer A) from 1 to 9, do (Actions)
        • Loop - Actions
          • Wait (0.01 / 100.00) seconds
          • Sound - Play BlinkArrival1 <gen> at 100.00% volume, attached to barrier[(Integer A)]
          • Unit - Remove barrier[(Integer A)] from the game
          • Sound - Play BlinkArrival1 <gen> at 100.00% volume, attached to barrier[((Integer A) + 9)]
          • Unit - Remove barrier[(Integer(((Real((Integer A))) + 9.00)))] from the game
          • Sound - Play BlinkArrival1 <gen> at 100.00% volume, attached to barrier[((Integer A) + 18)]
          • Unit - Remove barrier[(Integer(((Real((Integer A))) + 18.00)))] from the game
          • Sound - Play BlinkArrival1 <gen> at 100.00% volume, attached to barrier[((Integer A) + 27)]
          • Unit - Remove barrier[(Integer(((Real((Integer A))) + 27.00)))] from the game
  • Warping
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units within 435.00 of WarperCastPoint matching ((((Matching unit) belongs to an enemy of (Owner of Warper)) Equal to True) and (((Matching unit) is A ground unit) Equal to True))) and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 1.50 towards (Angle from WarperCastPoint to (Position of (Picked unit))) degrees)
          • Sound - Play ManaDrainTarget1 <gen> at 100.00% volume, attached to (Picked unit)
Dr Super Good, I found it very small trigger, and it works good, I like it, but I need help how to get it to be set as unit, not ability. Unit move with this barrier warp shield at anytime, you know?
 

Attachments

  • Warp Field.w3x
    19 KB · Views: 16
Last edited by a moderator:
Level 8
Joined
May 21, 2019
Messages
435
Hello all. I need help how to get this to be as buff barrier. I want this Wrap Field ability to be stay following the unit who casted this Wrap Field as buff barrier, you know? Because I want this unit to be able to push the enemy units.

  • Warp Field
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in Region 001 <gen>) and do (Actions)
        • Loop - Actions
          • Set Warper = (Picked unit)
          • Set WarperCastPoint = (Position of (Picked unit))
          • For each (Integer A) from 1 to 36, do (Actions)
            • Loop - Actions
              • Unit - Create 1 Dummy for (Owner of Warper) at WarperCastPoint facing ((Real((Integer A))) x 10.00) degrees
              • Set barrier[(Integer A)] = (Last created unit)
              • Sound - Play BlinkArrival1 <gen> at 100.00% volume, attached to (Last created unit)
      • Trigger - Turn on Warping <gen>
      • Wait 30.00 seconds
      • Trigger - Turn off Warping <gen>
      • For each (Integer A) from 1 to 9, do (Actions)
        • Loop - Actions
          • Wait (0.01 / 100.00) seconds
          • Sound - Play BlinkArrival1 <gen> at 100.00% volume, attached to barrier[(Integer A)]
          • Unit - Remove barrier[(Integer A)] from the game
          • Sound - Play BlinkArrival1 <gen> at 100.00% volume, attached to barrier[((Integer A) + 9)]
          • Unit - Remove barrier[(Integer(((Real((Integer A))) + 9.00)))] from the game
          • Sound - Play BlinkArrival1 <gen> at 100.00% volume, attached to barrier[((Integer A) + 18)]
          • Unit - Remove barrier[(Integer(((Real((Integer A))) + 18.00)))] from the game
          • Sound - Play BlinkArrival1 <gen> at 100.00% volume, attached to barrier[((Integer A) + 27)]
          • Unit - Remove barrier[(Integer(((Real((Integer A))) + 27.00)))] from the game
  • Warping
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units within 435.00 of WarperCastPoint matching ((((Matching unit) belongs to an enemy of (Owner of Warper)) Equal to True) and (((Matching unit) is A ground unit) Equal to True))) and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 1.50 towards (Angle from WarperCastPoint to (Position of (Picked unit))) degrees)
          • Sound - Play ManaDrainTarget1 <gen> at 100.00% volume, attached to (Picked unit)

Assuming that you don't use a LUA based garbage collector…
In the second trigger alone, you are leaking 100 unit groups and 200 points per unit in said groups EVERY SECOND. This could get out of hand extremely fast.
You need to fix those leaks, and maybe consider lowering the intensity of the periodic event to something a bit less extreme. 0.04 would probably yield almost identical results, at 1/4 the weight (if you scale the effect accordingly).

To make this pushing area follow the unit, all you need to do is set the location of "WarperCastPoint" to the unit casting the spell at the beginning of the second trigger.
Keep in mind that this would require yet another point to be memory cleaned.

Also, the current spell isn't at all MUI. In fact, it doesn't even seem to have an event response at all, so in its current state, it's locked onto a single unit at all times. This may be intended as either a permanent effect of said unit, but it could also be for testing purposes. If you need help changing this to an actual spell, I'm sure we can guide you on that too.

Also, if there's buildings in this map, you may wanna exclude those from this spells effect.

On a sidenote, this effect is extremely OP in its current state, because it instantly moves units. When a unit is moved instantly, its actions are interrupted. This effectively turns this pushback into a non-stop AOE stun. To avoid this, you need to adjust the X/Y coordinates of the targets, rather than moving them to a point. This also solves one of your location leaks.
 
Level 8
Joined
Jun 26, 2019
Messages
318
Assuming that you don't use a LUA based garbage collector…
In the second trigger alone, you are leaking 100 unit groups and 200 points per unit in said groups EVERY SECOND. This could get out of hand extremely fast.
You need to fix those leaks, and maybe consider lowering the intensity of the periodic event to something a bit less extreme. 0.04 would probably yield almost identical results, at 1/4 the weight (if you scale the effect accordingly).

To make this pushing area follow the unit, all you need to do is set the location of "WarperCastPoint" to the unit casting the spell at the beginning of the second trigger.
Keep in mind that this would require yet another point to be memory cleaned.

Also, the current spell isn't at all MUI. In fact, it doesn't even seem to have an event response at all, so in its current state, it's locked onto a single unit at all times. This may be intended as either a permanent effect of said unit, but it could also be for testing purposes. If you need help changing this to an actual spell, I'm sure we can guide you on that too.

Also, if there's buildings in this map, you may wanna exclude those from this spells effect.

On a sidenote, this effect is extremely OP in its current state, because it instantly moves units. When a unit is moved instantly, its actions are interrupted. This effectively turns this pushback into a non-stop AOE stun. To avoid this, you need to adjust the X/Y coordinates of the targets, rather than moving them to a point. This also solves one of your location leaks.

Okay. Forget this Wrap Barrier. What about this one? I need it to be set as unit and move with it, will need more than one unit. This one is better. But, I don't know how to get it to be a unit, not region to region, or special effect with timer. Because I need it for to keep pushing all players to middle for every 10 minutes. So they don't have to be pussy players, you know, to avoid causing the game so long by running back to base at half hp without wasting mana or cooldown to instant heal, or sitting and waiting for golds to save up enough to buy something big, or sitting and wait to be able to go backdooring. I got it worked pretty good, no problems, no leaks, but... it just... too many units because of region to region as special effect. I want it to be set as unit, and line up as wall, and push together around the outside of map's border before entering into map and pushing all players to middle for every 10 minutes. Almost like Fortnite game on Xbox.
 

Attachments

  • Push System Test Success.w3x
    37.3 KB · Views: 18
Status
Not open for further replies.
Top