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

Supernova v1.0 GUI

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
  • Like
Reactions: Empirean
Greetings gentlemen and -women,

it is my utmost pleasure to present this spell to you.

orboffire.gif
Creates a fireball at the targeted unit. While growing larger, it constantly deals 30/40/50dmg/s in an area of effect until it finally explodes;
spreads out into further fireballs which deal 30/40/50dmg/s damage over time and finally combust, dealing 60 area of effect damage.

*This spell is HIGHLY demanding on your system. Do not spam it unless you want Warcraft to lag or even desync.
*All damage is done via the Object Editor and set to Chaos type.
*This spell should be regarded as ultimate due to it's sheer damage.
*Supernova targets a single unit and damages ALL units in range; this includes your own Hero/unit.
*MUI of course
*Spell uses custom value, applied to one unit type within a unit-type-comparison-pick-all-units-action *phew*

  • Nova Init
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Nova
    • Actions
      • Set Nova_dummy0_exp = 2.00
      • -------- Define the target point --------
      • Set Nova_tmppt[0] = (Position of (Target unit of ability being cast))
      • -------- Create the dummy unit --------
      • Unit - Create 1 Nova_dummy_0 for (Owner of (Triggering unit)) at Nova_tmppt[0] facing Default building facing degrees
      • Unit - Add a Nova_dummy0_exp second Generic expiration timer to (Last created unit)
      • Unit - Create 1 Nova_dummy_1 for (Owner of (Triggering unit)) at Nova_tmppt[0] facing Default building facing degrees
      • -------- Adjust the ability level --------
      • Unit - Set level of Nova_Immolation for (Last created unit) to (Level of Nova for (Triggering unit))
      • Unit - Order (Last created unit) to Night Elf Demon Hunter - Activate Immolation
      • -------- SFX!!! --------
      • Special Effect - Create a special effect at Nova_tmppt[0] using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • -------- Leak Cleanup and initiation of the peiodic trigger --------
      • Custom script: call RemoveLocation(udg_Nova_tmppt[0])
      • Trigger - Turn on Nova Peroidic <gen>
  • Nova Peroidic
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • -------- Define variables --------
      • Set Nova_group = (Units of type Nova_dummy_1)
      • Set Nova_scale = 500
      • Set Nova_scale_speed = 20.00
      • Set Nova_range[0] = 0.50
      • Set Nova_range[1] = 2.00
      • -------- Check whether there are units --------
      • Unit Group - Pick every unit in Nova_group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in Nova_group) Greater than 0
            • Then - Actions
              • -------- Rescale --------
              • Animation - Change (Picked unit)'s size to (((Real((Custom value of (Picked unit)))) + Nova_scale_speed)%, ((Real((Custom value of (Picked unit)))) + Nova_scale_speed)%, ((Real((Custom value of (Picked unit)))) + Nova_scale_speed)%) of its original size
              • -------- Creation of dummy units if the scaling value is met --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Custom value of (Picked unit)) Equal to Nova_scale
                • Then - Actions
                  • For each (Integer A) from 1 to 16, do (Actions)
                    • Loop - Actions
                      • Set Nova_tmppt[1] = (Position of (Picked unit))
                      • Set Nova_exp = (Random real number between Nova_range[0] and Nova_range[1])
                      • Unit - Create 1 Nova_dummy_2 for (Owner of (Picked unit)) at Nova_tmppt[1] facing Nova_deg degrees
                      • Unit - Add a Nova_exp second Generic expiration timer to (Last created unit)
                      • Unit - Order (Last created unit) to Night Elf Demon Hunter - Activate Immolation
                      • -------- Alignment of ability level --------
                      • Unit - Set level of Nova_Immolation for (Last created unit) to (Level of Nova for (Triggering unit))
                      • Unit - Explode (Picked unit)
                      • -------- Increasing the angle by 22.5° --------
                      • Set Nova_deg = (Nova_deg + 22.50)
                      • -------- Once the CV is met, this will turn on Nova Periodic 2 --------
                      • Trigger - Turn on Nova Peroidic2 <gen>
                      • Custom script: call RemoveLocation(udg_Nova_tmppt[1])
                • Else - Actions
              • -------- Increase the CV --------
              • Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) + ((Integer(Nova_scale_speed)) / 2))
            • Else - Actions
              • Trigger - Turn off (This trigger)
      • -------- Leak clean-up --------
      • Custom script: call DestroyGroup(udg_Nova_group)
  • Nova Peroidic2
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • Set Nova_dummy_speed = 15.00
      • Set Nova_group = (Units of type Nova_dummy_2)
      • Unit Group - Pick every unit in Nova_group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in Nova_group) Greater than 0
            • Then - Actions
              • Set Nova_tmppt[2] = (Position of (Picked unit))
              • Unit - Move (Picked unit) instantly to (Nova_tmppt[2] offset by Nova_dummy_speed towards (Facing of (Picked unit)) degrees)
              • Custom script: call RemoveLocation(udg_Nova_tmppt[2])
            • Else - Actions
              • Trigger - Turn off (This trigger)
      • Custom script: call DestroyGroup(udg_Nova_group)
  • Nova Death Event
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Dying unit)) Equal to Nova_dummy_1
          • (Unit-type of (Dying unit)) Equal to Nova_dummy_2
    • Actions
      • Set Nova_tmppt[3] = (Position of (Dying unit))
      • -------- Choose which actions to apply --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Dying unit)) Equal to Nova_dummy_2
        • Then - Actions
          • For each (Integer A) from 1 to 6, do (Actions)
            • Loop - Actions
              • -------- ang[0] goes from 0-380°, meaning a full circle --------
              • Set Nova_ang[0] = (Random real number between 0.00 and 360.00)
              • -------- ang[1] defines the minimum and maximum range --------
              • Set Nova_ang[1] = (Random real number between 0.00 and 500.00)
              • Unit - Create 1 Nova_dummy_3 for (Owner of (Dying unit)) at Nova_tmppt[3] facing Nova_ang[0] degrees
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • -------- Choosing a random target point --------
              • Set Nova_tmppt[4] = (Nova_tmppt[3] offset by Nova_ang[1] towards Nova_ang[0] degrees)
              • Unit - Order (Last created unit) to Attack Ground Nova_tmppt[4]
              • -------- And Done --------
              • Custom script: call RemoveLocation(udg_Nova_tmppt[4])
          • Special Effect - Create a special effect at Nova_tmppt[3] using Abilities\Spells\Other\Volcano\VolcanoDeath.mdl
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
          • Special Effect - Create a special effect at Nova_tmppt[3] using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl
          • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_Nova_tmppt[3])
Keywords:
Squiggy, spell, Supernova, fire, gui, mui, epic, halp my pc broke because of the excess of SFX
Contents

Supernova (Map)

Reviews
21:18, 4th Apr 2016 Tank-Commander: v1.0 - There's a lot of problems to go over before the resource can be approved, please view other user feedback and my post and I hope to see an update so I can approve this for you

Moderator

M

Moderator

21:18, 4th Apr 2016
Tank-Commander: v1.0 - There's a lot of problems to go over before the resource can be approved, please view other user feedback and my post and I hope to see an update so I can approve this for you
 
Level 11
Joined
Jul 25, 2014
Messages
490
Hashtables are a bit oldschool for a GUI spell. People tend to use Dynamic Indexing or Linked List :p EDIT: oops *unit groups.

This is not really configurable for a total newbie, add a configuration trigger.

When using a function more than twice like Triggering Unit, you should store it into variable for better efficiency. You seem to do that a lot.

Is there a reason to use a unit's custom value over a consistent variable? To my knowledge, messing with that is not recommendable.

Dying Unit -> Triggering Unit.

These are the things that caught my eye in the triggers.
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
The effects are definitely intense. There are a lot of things I can nitpick about this spell (like storing Picked unit into a variable), buut that's just optimization. Here are some things that caught my eye though:

  • You should really have a config section. Almost every aspect of your spell is hardcoded, meaning that if a user wanted to change anything, they would have to go through your triggers (ex: all the dummy types).
  • Consider looking into dummy.mdx. This will reduce the overall dummy count to 1
  • The Unit Group - Units of Type function has a leak that can't be removed via GUI. You should just filter them out using an If/Then/Else
  • Where do you change the custom value of the units? You should really avoid this as Unit Indexers are the only resources allowed to mess with them
  • Eeek Integer A? Create your own integer variable so that this doesn't clash with other people's project.

Hashtables are a bit oldschool for a GUI spell. People tend to use Dynamic Indexing or Linked List :p
Squiggy isn't using hashtables?
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
This spell is a bit odd.
It is fairly well triggered but it still got some basic mistakes.

1. Everything that you use more than once should be in a variable (triggering unit, last created unit etc)
2. You got no config trigger, if you look at any approved spell you will see what that is.
3. you got two triggers with the same event, those should be merged
4. don't use integer A/B, I prefer to do so myself but the mods WILL request you to change so I might as well point it out to save you some time.
 
I went over the code a couple times and I found quite a lot of problems and I figured this would be enough to list to get started, if you have any questions feel free to PM me and I'll see if I can help

Major:
- Lacks a configuration
- You have two triggers with the same event and the same stop conditions, they could be merged
- We tend to advise against using custom values of units except in the case of standardised systems like unit indexers
- You can add dummies to the Nova_Group when they're created instead of having to re select the units every iteration, if you remove them when they die then it won't cause a leak
- Variable use to store temporary values that are used more than once should be done
- (Level of Nova for (Triggering unit)) is referenced in your periodic trigger - this will return 0 if another event is fired during the course of the ability since triggering unit will change
- Spells should avoid messing up the endgame scorescreen, to that effect we try to make dummy units owned by a neutral player
- Spell damage should mimic game mechanics: The origin of damage dealt by the spell should be the caster of the spell

Minor:
- You don't need to use an array of locations, at most at any given time you need two which could easily be separate location variables (at the least the indexes 0 and 1 could be reused, the location array assigns a lot of extra memory
- When setting model scales you can set the last two values to be 0., it does the same thing and saves a few mathematical operations
- You turn the periodic trigger on every time you cast the ability, even if it's already turned on which is pretty inefficient
- Utilising Dummy.mdl would enable you to use one dummy unit instead of many for the spell and simply attach the required model and apply the abilities to them
- Dying unit can be replaced with triggering unit
 
Top