• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Holy Explosion spell (needs review)

Status
Not open for further replies.
Level 4
Joined
May 27, 2012
Messages
60
I am a beginner in Trigger Editing, and I need this spell to be reviewed so I can know what I am doing wrong, how to fix leaks, etc, and if theres any easier way to do what I did.

Thanks

16gbi1.jpg
 
Level 19
Joined
Feb 25, 2009
Messages
2,004

  • Holy Explosion
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Holy Explosion
    • Actions
      • Set HolyExpPoint = (Position of (Triggering unit))
      • Set HolyExpLevel = (Level of (Ability being cast) for (Triggering unit))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 800.00 of HolyExpPoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)))) and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 100.00 damage of attack type Spells and damage type Normal
      • For each (Integer Loop_Int) from 1 to 7, do (Actions)
        • Loop - Actions
          • Set Temp_Point = (HolyExpPoint offset by (Random real number between 0.00 and 800.00) towards (Random angle) degrees)
          • Unit - Create 1 HolyExplosionDummy for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation (udg_Temp_Point)
      • Custom script: call RemoveLocation (udg_HolyExpPoint)


- Angles cannot be more than 360
- Starting from -800 and 0 is the same
- You store the spell location but never clear it or use it in the actually trigger
- No need to save (Triggering Unit) into a variable for instant spells
- I'd rather use special effects instead of dummies with the model, but thats entirely up to you

Since you posted as a screenshot, I'm unable to retrieve the other part of the information.

Also check this: http://www.hiveworkshop.com/forums/miscellaneous-tutorials-456/how-easily-post-triggers-163285/
 
Level 4
Joined
May 27, 2012
Messages
60
thanks for the help MortAr, for the triggers you made, I would raise the special effect, or dummy amount by changing the 1-7 to a higher number?

also, thanks for the link to easily posting triggers
 
Level 4
Joined
May 27, 2012
Messages
60
Yes, instead of spawning dummies, just create the special effect at the position and then destroy them via the GUI function.

Thanks

And the only reason I was using dummys, is because I don't know how to scale Special Effects.

[EDIT]
Is there a difference between "Begins casting an ability" and "Starts the effect of an ability"
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
Yes, if you use "Begins casting an ability" you can abuse the ability effect by quickly pressing it and immediately pressing 'Stop' which won't stop the trigger from firing.

However, using "Starts the effect of an ability" will not cause this to happen, since the trigger fires when the ability enters cooldown, and even if you press 'Stop', nothing will happen.
 
Level 4
Joined
May 27, 2012
Messages
60
Hows this?

  • Holy Explosion
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Holy Explosion
    • Actions
      • Set HolyExpPoint = (Target point of ability being cast)
      • Set HolyExp_ABLevel = (Level of (Ability being cast) for (Triggering unit))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 800.00 of (Target point of ability being cast) matching ((((Matching unit) is A structure) Equal to (==) False) and ((((Matching unit) is alive) Equal to (==) True) and (((Matching unit) belongs to an enemy of (Triggering player)) Equal to (==) and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing ((Real((Level of (Ability being cast) for (Triggering unit)))) x (5.00 x (Real((Intelligence of (Triggering unit) (Include bonuses)))))) damage of attack type Spells and damage type Normal
            • Do Multiple ActionsFor each (Integer L_INT) from 1 to 7, do (Actions)
              • Loop - Actions
                • Set Temp_Point = (HolyExpPoint offset by (Random real number between 0.00 and 800.00) towards (Random angle) degrees)
                • Unit - Create 1 HolyExplosionDummy for (Owner of (Triggering unit)) at Temp_Point facing Default building facing (270.0) degrees
                • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                • Custom script: call RemoveLocation (udg_Temp_Point)
      • Custom script: call RemoveLocation (udg_HolyExpPoint)
Hows that?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
You already have this
  • Set HolyExpPoint = (Target point of ability being cast)
so why don't you replace it in here:
  • Unit Group - Pick every unit in (Units within 800.00 of >>>>>HolyExpPoint<<<<< matching ((((Matching unit) is A structure) Equal to (==) False) and ((((Matching unit) is alive) Equal to (==) True) and (((Matching unit) belongs to an enemy of (Triggering player)) Equal to (==) and do (Actions)
You should save the (Triggering unit) into a variable, after repeating every same calling function is not very efficient
 
Status
Not open for further replies.
Top