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

Comical Pounding (v1b)

This bundle is marked as high quality. It exceeds standards and is highly desirable.
A simple spell that I made in GUI.

Spell Description:

Summons a giant magical hammer that slams an area three times, mini-stunning and dealing base damage with cumulative bonus damage after the first slam.
Level 1 - 80 base damage. 40 bonus damage.
Level 2 - 100 base damage. 45 bonus damage.
Level 3 - 120 base damage. 50 bonus damage.

Units that die by this spell will explode.

full


1. In your WorldEditor, go to File -> Preferences. Then check "Automatically create unknown variables while pasting trigger data". Click "OK"

2. In Object Editor (F6) -> Abilities, copy both "Comical Pounding" and "Comical Pounding Stun (Dummy)" ability and paste them to your map.

3. In Object Editor (F6) -> Units, copy the "Comical Pounding Dummy" unit and paste it to your map. Make sure that the dummy in your map has the stun ability, otherwise you should reconfigure it.

4. In Asset manager (F12), export the "war3mapImported\ComicalHammer.mdx" model to a temporary directory, then import it to your map.

5. In Trigger Editor (F4), copy the "Comical Pounding" trigger folder and paste it to your map. Make sure you check the configurations in "Comical Pounding Config" if they are mistakenly set or not.

Featured custom model is made by me.
Please report any bugs or memory leaks in the comment section below. Criticisms are welcome.

  • Fixed recycling bug in the indexing.
  • Changed the index variable names for comfort.
  • Spawns a single dummy instead of multiple.
  • Adds a temporary vision to the spell area, allowing the dummy to cast stun to targets.
  • Swapped the code to damage first before switching stages.
Contents

Comical Pounding (Map)

Reviews
Antares
Issues were all fixed. (Small new issue: You disabled parts of the map init trigger in your test map) An awesome spell shipped with its own well-fitting model, surely to get a laugh out of players whenever it is used! High Quality

Antares

Spell Reviewer
Level 22
Joined
Dec 13, 2009
Messages
522
An awesome looking spell that will surely get a laugh out of players whenever it is used!

The spell works well and is easily configurable. There are, however, two things that need to be fixed:
  • The use of zCP_Index variable for both the loop integer and the loop limit is quite confusing and makes the code hard to decipher. Please split these into two variables and give them more descriptive names.
  • You're creating a lot of dummy units to stun the affected units. You can reduce the amount of dummies you need drastically by having one global dummy for your system that you use to cast the stun on all units. To do so, set its cast and backswing point to 0, turn rate to 3, movement type to none, movement speed to 0, and move it to the target unit before ordering it to cast (How to create a dummy that can cast more than once).

Awaiting Update
 
Last edited:
An awesome looking spell that will surely get a laugh out of players whenever it is used!

The spell works well and is easily configurable. There are, however, two things that need to be fixed:
  • The use of zCP_Index variable for both the loop integer and the loop limit is quite confusing and makes the code hard to decipher. Please split these into two variables and give them more descriptive names.
  • You're creating a lot of dummy units to stun the affected units. You can reduce the amount of dummies you need drastically by having one global dummy for your system that you use to cast the stun on all units. To do so, set its cast and backswing point to 0, turn rate to 3, movement speed to 0, and move it to the target unit before ordering it to cast (How to create a dummy that can cast more than once).

Awaiting Update
What's turn rate needed for?
 

ILH

ILH

Model Reviewer
Level 26
Joined
May 8, 2012
Messages
1,236
An awesome looking spell that will surely get a laugh out of players whenever it is used!

The spell works well and is easily configurable. There are, however, two things that need to be fixed:
  • The use of zCP_Index variable for both the loop integer and the loop limit is quite confusing and makes the code hard to decipher. Please split these into two variables and give them more descriptive names.
  • You're creating a lot of dummy units to stun the affected units. You can reduce the amount of dummies you need drastically by having one global dummy for your system that you use to cast the stun on all units. To do so, set its cast and backswing point to 0, turn rate to 3, movement type to none, movement speed to 0, and move it to the target unit before ordering it to cast (How to create a dummy that can cast more than once).

Awaiting Update
Thanks for the review!

Consider them done. But I have one question about recycling point variables in the indexing. Will this leak?
  • Custom script: call RemoveLocation(udg_zCP_Point[udg_zCP_CurrentIndex])
  • Set VariableSet zCP_Point[zCP_CurrentIndex] = zCP_Point[zCP_MaxIndex]
  • Custom script: set udg_zCP_Point[udg_zCP_MaxIndex] = null
  • Set VariableSet zCP_MaxIndex = (zCP_MaxIndex - 1)
  • Set VariableSet zCP_CurrentIndex = (zCP_CurrentIndex - 1)
 

Antares

Spell Reviewer
Level 22
Joined
Dec 13, 2009
Messages
522
I see, yes, it does leak in the current version, but only as a side-effect to a different problem. You're not transfering the location to the new index when you reorder your list after one instance of the spell finishes. This makes the still-running instance use the location you just removed, while the location it should use loses its references and leaks. You can observe the bug when you cast the spell on an empty location and shortly before it finishes on the footmen. You'll see that they take no damage.

It is also a potential issue that you're continuing with the execution of the code within the loop after you remove an instance. Flipping the order of the damage block and the check if stage is 4 block should prevent any bugs of that kind (just see that zCP_Stage isn't off by 1 in the calculations).

In the version you posted, there shouldn't be a leak. The nulling isn't necessary.
 
Last edited:

ILH

ILH

Model Reviewer
Level 26
Joined
May 8, 2012
Messages
1,236
Issues were all fixed. (Small new issue: You disabled parts of the map init trigger in your test map)

An awesome spell shipped with its own well-fitting model, surely to get a laugh out of players whenever it is used!

High Quality
Yes, I did it in order to test out-of-vision situations. Thanks for the moderation! :)
 
Top