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

Titans Retribution

This bundle is marked as awaiting update. A staff member has requested changes to it before it can be approved.
casts a bow like thunder that grows with time and damage enemies. also charge the caster with energy and finally caster fires a mighty arrow that pierce through even the strongest titans. Explosions deal ((Str+int)/2) * ability lvl, blue lightning deal half of explosions damage, red lightning deal 1/10 of explosions damage per 0.05 seconds and the mighty arrow deal 1/3 of explosion damage per 0.01 seconds.
please do not use more than 20 number of casts variable because it might cause some minor bugs. (default 20)
Contents

Titans Retribution (Map)

Reviews
Wrda
Help_TTT looks pointless. It is 0 at the first cast and then is set to 1 in the middle of nowhere. Unit Group - Pick every unit in (Units in (Region centered at ((Position of Hero_TTT) offset by (((Real(Cast_TTT_2)) x 50.00) x -1.00) towards...

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,892
Help_TTT looks pointless. It is 0 at the first cast and then is set to 1 in the middle of nowhere.
  • Unit Group - Pick every unit in (Units in (Region centered at ((Position of Hero_TTT) offset by (((Real(Cast_TTT_2)) x 50.00) x -1.00) towards (Facing_TTT + 120.00) degrees.) with size (300.00, ((Real((Cast_TTT_2 + 1))) x 100.00)))) and do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Picked unit)) is an enemy of (Owner of Hero_TTT).) Equal to True
        • Then - Actions
          • Unit - Cause Hero_TTT to damage (Picked unit), dealing ((Real(DMG_TTT)) / 2.00) damage of attack type Spells and damage type Normal
        • Else - Actions
I don't understand why you decided to sometimes pick units within a region and other times within X range.
Lots of special effect leaks, unit groups and point leaks. Destroy them imediately after creating (the thunderclap ones), since you only want the their death animations.
You should use your own integer loops, using only integer A and B might interfer in other users' triggers and are usually unsafe as they can get overwritten.
Waits are almost always avoided due to their inaccuracy on low duration amounts.
Most spells (if not most) require to be MUI, as in, able to be cast by multiple units without bugs.

You should structure the spell in the following ways:
1. A configurable trigger, where the user sets up his desirable values that affect the spell overall.
2. A cast trigger, when the unit casts the ability, turns periodic trigger on if it's the first index of the spell.
3. A periodic trigger, where the spell has effects per interval, it can also have stages or phases. Includes deindexing when the spell ends.
4. You also might have a cancel trigger, depending on the spell.


These tutorials should help you on that.

This needs quite a lot of rework at the moment.
 
Level 6
Joined
Jul 10, 2023
Messages
32
Help_TTT fixes a bug you can remove then you will see the bugs happening.
In warcraft 3 region width and height changes with facing of casting hero and in some directions the region is smaller and vice versa. so every weird thing you see have a reason.
As you said I destroyed a special effect right after creating it, the reason is I need it's death animation.
The reason of small leaks in unit groups is 'region width and height' problem it can be fixed by using multiple small areas for unit groups instead of it.
I realized it too late, but I will fix it as soon as I can.
Thanks for review.
 

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,892
Unfortunately regions don't natively rotate, so some units will get hit while others don't. If you do wish to still use regions, I'd just remind you to be aware to remove the regions after using them with RemoveRect(udg_rectvariable).
I saw the bug and I managed to fix that. You were using Integer A in parts where it wasn't being used at all, so it became Cast_TTT[0], which is 0.
This also had to be changed:
  • ((NumberofCast_TTT / 2) + 1) Greater than Cast_TTT_3
Looping with Integer A, B, or your own variable already increments the counter automatically, no need to "set Loop integer A.
Cast_TTT doesn't even need to be array at all too.

When I said destroying special effects immediately after creating I meant right after creation, with no delay.
I also forgot to mention that terrain deformations always cause permanent memory leaks, it's unavoidable, if it does really need to be part of the spell, I would use it with caution, or better, sparingly.

This should also help with replacing the waits.

PS: I attached the map without that bug.
 

Attachments

  • Titans RetributionClearer.w3x
    33.7 KB · Views: 3
Top