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

Alchemist Unstable Concoction

This bundle is marked as awaiting update. A staff member has requested changes to it before it can be approved.
Alchemist Unstable Concoction Ability:
Alchemist brews up an unstable concoction that he can throw at an enemy hero. to stun and deal smashing damage in an area around the explosion. The longer the concoction brews. the more damage it deals and the longer the stun. After 5 seconds, the brew reaches its maximum damage and stun time. However. after 55 seconds, the concoction will explode on Alchemist himself if not thrown.

Level 1 - Up to 150 damage, up to 1.75 s stun.
Level 2 - Up to 220 damage. up to 25 s stun.
Level 3 - Up to 290 damage, up to 3.25 s stun.
Level 4 - Up to 360 damage, up to 4 s stun.

Cooldown: 16
Manacost: 120

changelog:
  • Remake and convert to MUI
Contents

Unstable Concoction (Map)

Reviews
KILLCIDE
Needs Fixed You have way too many hardcoded values in the code. Importing and configuring this would be a nightmare. Please have a config trigger where users can configure aspects of the spell such as damage, duration, damage type, etc. Take a look at...

Deleted member 247165

D

Deleted member 247165

I'm pretty sure Unstable Concoction does not mini stun the Alchemist whenever 0.50 seconds pass. You should check that.
 

Deleted member 247165

D

Deleted member 247165

that pause of 0.50 seconds in your trigger.
 
Level 18
Joined
Oct 17, 2012
Messages
820
@DexterFstone The more important issue is that your spell is not MUI, which means multiple units cannot cast the spell at the same time. In fact, the same unit may not be able to spam the spell without glitches. If your spell has a duration, a unit can bug the spell out if it casts the spell again before the duration of the previous spell cast is over. Try your hand at remaking the spell with either dynamic indexing or linked list. Or follow your own path. However, you might not be able to make heads or tails on which direction to go if you choose to do so. Besides, there are many more options to choose from to achieve MUI:
  1. MUI Triggers with Waits
  2. GUI Spell System
  3. Unit Indexer
  4. Spell Framework
  5. Allocator Engine
  6. MUI Engine
  7. Mui
  8. Shadowing Globals (not really an option in your case)
  9. GBS
  10. and many more...
Of course, all of these options require you to make some effort in learning how to utilize them.

P.S. I hope I do not get banned for making too many edits in such quick sessions.
 
Last edited:
Level 7
Joined
Sep 19, 2020
Messages
190
@DexterFstone The more important issue is that your spell is not MUI, which means multiple units cannot cast the spell at the same time. In fact, the same unit may not be able to spam the spell without glitches. If your spell has a duration, a unit can bug the spell out if it casts the spell again before the duration of the previous spell cast is over. Try your hand at remaking the spell with either dynamic indexing or linked list. Or follow your own path. However, you might not be able to make heads or tails on which direction to go if you choose to do so. Besides, there are many more options to choose from to achieve MUI:
  1. MUI Triggers with Waits
  2. GUI Spell System
  3. Unit Indexer
  4. Spell Framework
  5. Allocator Engine
  6. MUI Engine
  7. Mui
  8. Shadowing Globals (not really an option in your case)
  9. GBS
  10. and many more...
Of course, all of these options require you to make some effort in learning how to utilize them.

P.S. I hope I do not get banned for making too many edits in such quick sessions.
ok, I try to fix it. :(
 

Deleted member 247165

D

Deleted member 247165

Nice. The caster is not paused every 0.50 seconds anymore now.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485

Needs Fixed

  • You have way too many hardcoded values in the code. Importing and configuring this would be a nightmare. Please have a config trigger where users can configure aspects of the spell such as damage, duration, damage type, etc. Take a look at all the approved spells in the section and see how they set up their config trigger.
  • Definitely feel uneasy about making your periodic loop timer 0.5 seconds. Seems way too slow, and you can run into a lot of inconsistences with the spell when a lot of them are cast. I'd stick to 0.03 second loop timer, and to visually update the timer to the player every 0.5 seconds.
  • Try to reduce the number of function calls you make in the periodic loop. For example, you call (Picked unit) almost every single time when you can just store (Picked unit) into a variable at the beginning of the loop and just reference that. The same goes for (Last created hashtable). Why not just use UC_Hash?
  • When you create the dummy unit to stun the target, you leak a location.

Suggestions

  • PLEASE leave notes or comments somewhere about which key is which. When you "Load 0" or "Load 1", I always have to go back to remember what kind of data is saved into these key values. I usually recommend just using named variables like instead of "Load 0" you'd do something like "Load CASTER_KEY" where CASTER_KEY = 0 somewhere in your configurable trigger. It makes reading your code A LOT easier.
  • Unstable Concoction Learn should only activate the first time the player ever learns the spell. Seems pointless to keep disabling the Shot ability when they already have the ability disabled.
  • You should only turn on the periodic loop trigger if you need to, not every single time the spell is casted.
  • Instead of checking if the caster group is empty to turn off the trigger, you can just keep an internal counter in the code to determine when you need to turn it on/off. For example, a caster casts the spell so set counter = counter + 1. If counter == 1, then turn trigger on. Now caster finishes the spell, set counter = counter - 1. If counter == 0, turn off trigger.

Status

Awaiting Update
 
Top