• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Requesting help for a spell I'm working on [GUI]

Status
Not open for further replies.
Level 3
Joined
Feb 3, 2016
Messages
43
I'm currently working on a spell for a hero (Thor) and it seems to be working correctly (and without issues) as far as I can see and test, but another set of more experienced eyes is always appreciated!

Spell intented behaviour: Once cast, a hammer projectile will fly towards the targeted point, stunning ALL (friend and foe, but excluding structures) units in its path. Upon reaching the targeted point, it will begin to return to the caster, now dealing 400 damage to ALL units it passes through (but not necessarily the units it stunned on its way forward). A ChainLightning special effect is created (and destroyed) on the affected units, both when going forward and when returning.

Thank you for your help! (The triggers are in order, with HammerForward and HammerReturn being "initially enabled=no")
Snimka zaslona (19).png
Snimka zaslona (20).png
Snimka zaslona (21).png
 
Level 16
Joined
Mar 25, 2016
Messages
1,327
The spell looks good and it seems there are no functional mistakes. However it leaks and it's not MUI. You probably don't need it to be MUI, if it's only used by one hero and the hero only exists once in the map.
Here you can read, how to avoid leaks: Things That Leak

I don't see why you use 4 groups here, if you can do it in one. Instead of adding the unit to Stun_Targets/Damage_Targets, immediatly stun/damage the target and add it to a group, so it is not stunned/damaged multiple times. You can use the same group, because the stun groups are cleared, before the damage groups are used.

You can use trigger tags instead of screenshots: How To Post Your Trigger
 
Level 3
Joined
Feb 3, 2016
Messages
43
The spell looks good and it seems there are no functional mistakes. However it leaks and it's not MUI. You probably don't need it to be MUI, if it's only used by one hero and the hero only exists once in the map.

Can you explain how this isn't MUI-compatible? Is it because of the "turn off (this trigger)" in the "begining"? Also, thanks for the leaks, I will look into it.
 
Level 16
Joined
Mar 25, 2016
Messages
1,327
There are a lot of reasons, why this is not MUI.
Variables (Throw_End, Mjollnir_Thrower,...) can only store one value, so casting it several times will overwrite them and lead to bugs.
Turn off can also make problems, if you use it wrong (you should only turn the trigger off, if all spell instances of this spell are finished).
You could use dynamic indexing to make it MUI: Visualize: Dynamic Indexing
 
Status
Not open for further replies.
Top