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

Unit Fusion

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
  • Like
Reactions: Hermit
  • Fuse a unit with another selected unit of the same type
  • Damage and death are shared among the fusing units
  • Create a new unit of any type after fusion
  • Should work on any patch
Take a look at [GUI-Friendly] Unit Fusion System for something with many more options and possibilities.

Configuration Variables:
FuseAbilAbility CodeAbility that starts the fusion. Can be any non-target ability.
FuseAbilChanAbility CodeMust be a Channel ability. Use the following settings:
-Disable Other Abilities: True
-Follow Through Time: how long the fusion process takes
-Options: None
-Target Type: Instant
-Order String - Use/Turn On: channel
FusedAnimStringAnimation for the fused unit to play after fusion. Leave empty to play no animation.
FusedSfxStringSpecial effect created on the fused unit. Leave empty to create no effect.
FusedUnitUnit-TypeUnit type of the fused unit.
FuseHashtableHashtable
FuseImmuneBooleanWhether to make the fusing units magic immune during the fusing process.
FuseRangeRealMaximum range for target unit to fuse with.
FuseSfxStringSpecial effect to create between the fusing units during the fusion process.

2020-10-24
- Fixed death/damage triggers never being destroyed

2020-10-21
- Made some improvements/fixes
Contents

Unit Fusion (Map)

Releasing a short review:

Spell Review:


The mechanics of the Unit Fusion spell appear to be quite similar to [GUI-Friendly] Unit Fusion System, albeit with a lot of restrictions (unit fusion mechanic is restricted to one spell). There isn't much to say here.

Code:

  • The filter condition may appear to be wrongfully stated; it checks if the level of the base spell is greater than 0 instead of checking if the spell is being cast.

  • The spell generates a lot of objects. This is likely prone to memory leaks as a result. Try to minimize the amount of generated objects in the pre-fusion process.

  • A timer can be used directly instead of leaving the callback to a trigger. This is prominent in (Fuse__AdjustDamage_Conditions).

  • This spell could benefit a lot more from an OOP approach. (The way instances are generated support a strong data structure).

Rating:


Due to the existence of a generalized Unit Fusion System, as well as the above points,
I'll have to move this to Substandard
 
Thanks for the review.

The filter condition may appear to be wrongfully stated; it checks if the level of the base spell is greater than 0 instead of checking if the spell is being cast.
This is as intended, it checks if the casting unit has the spell before continuing to the conditions. Maybe this is unnecessary?

The spell generates a lot of objects. This is likely prone to memory leaks as a result. Try to minimize the amount of generated objects in the pre-fusion process.
Hmm, I don't think I can eliminate any objects, but I'll review the code. I tried to be thorough in plugging any leaks though.

A timer can be used directly instead of leaving the callback to a trigger. This is prominent in (Fuse__AdjustDamage_Conditions).
Right, I'll change that.

This spell could benefit a lot more from an OOP approach. (The way instances are generated support a strong data structure).
I wanted to keep this strictly JASS (no vJASS), so unfortunately no OOP approach available.
 
Last edited:
Top