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

Solar Ball v1.0 [GUI][MUI]

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Informations
181889-albums4279-picture49931.jpg

Create a solar ball forwards the caster,the phoenix is regenerating hit points inside the ball and burns nearby units,after the solar ball reached target point,phoenix will released solar break and deals damage to nearby units,the phoenix can cast again solar break.
[Level 1] - Deals 100 damage when the phoenix released.
[Level 2] - Deals 200 damage when the phoenix released.
[Level 3] - Deals 300 damage when the phoenix released.
Triggers
  • SB Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Solar Ball
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SB_IndexSize Equal to 0
        • Then - Actions
          • Trigger - Turn on SB Loop <gen>
        • Else - Actions
      • Set SB_IndexSize = (SB_IndexSize + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SB_IndexSize Greater than SB_IndexMaxSize
        • Then - Actions
          • Set SB_Index[SB_IndexSize] = SB_IndexSize
          • Set SB_IndexMaxSize = SB_IndexSize
        • Else - Actions
      • Set SB_TempInt = SB_Index[SB_IndexSize]
      • -------- xxxxxxxxxxxxxxxxxxx --------
      • Set SB_Caster[SB_TempInt] = (Triggering unit)
      • Set SB_CasterPt[SB_TempInt] = (Position of SB_Caster[SB_TempInt])
      • Set SB_TargetPoint[SB_TempInt] = (Target point of ability being cast)
      • Set SB_MaxDistance[SB_TempInt] = (Distance between SB_CasterPt[SB_TempInt] and SB_TargetPoint[SB_TempInt])
      • Set SB_MinDistance[SB_TempInt] = 0.00
      • Set SB_AngleDummy[SB_TempInt] = (Angle from SB_CasterPt[SB_TempInt] to SB_TargetPoint[SB_TempInt])
      • Set SB_Angle[SB_TempInt] = 0.00
      • Set SB_Boolean[SB_TempInt] = True
      • Set SB_Level[SB_TempInt] = (Level of (Ability being cast) for SB_Caster[SB_TempInt])
      • Unit - Create 1 Dummy for (Triggering player) at SB_CasterPt[SB_TempInt] facing (Facing of SB_Caster[SB_TempInt]) degrees
      • Set SB_Dummy[SB_TempInt] = (Last created unit)
      • Unit - Turn collision for SB_Dummy[SB_TempInt] Off
      • Set SB_DummyPoint = (Position of SB_Dummy[SB_TempInt])
      • Set SB_AreaPoint = (SB_DummyPoint offset by 400.00 towards SB_Angle[SB_TempInt] degrees)
      • Lightning - Create a Finger of Death lightning effect from source SB_DummyPoint to target SB_AreaPoint
      • Set SB_LightningEffect[SB_TempInt] = (Last created lightning effect)
      • Unit Group - Add SB_Caster[SB_TempInt] to SB_CasterGroup
      • Custom script: call RemoveLocation(udg_SB_DummyPoint)
      • Custom script: call RemoveLocation(udg_SB_AreaPoint)
  • SB Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer SB_IndexLoop) from 1 to SB_IndexSize, do (Actions)
        • Loop - Actions
          • Set SB_TempInt = SB_Index[SB_IndexLoop]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (SB_Caster[SB_TempInt] is alive) Equal to True
              • (SB_Caster[SB_TempInt] is in SB_CasterGroup) Equal to True
              • SB_MaxDistance[SB_TempInt] Greater than SB_MinDistance[SB_TempInt]
            • Then - Actions
              • Set SB_MinDistance[SB_TempInt] = (SB_MinDistance[SB_TempInt] + 10.00)
              • Set SB_Angle[SB_TempInt] = (SB_Angle[SB_TempInt] + 5.00)
              • Set SB_DummyPoint = (Position of SB_Dummy[SB_TempInt])
              • Set SB_AreaPoint = (SB_DummyPoint offset by 400.00 towards SB_Angle[SB_TempInt] degrees)
              • Set SB_OffPoint = (SB_CasterPt[SB_TempInt] offset by SB_MinDistance[SB_TempInt] towards SB_AngleDummy[SB_TempInt] degrees)
              • Lightning - Move SB_LightningEffect[SB_TempInt] to source SB_DummyPoint and target SB_AreaPoint
              • Unit - Move SB_Dummy[SB_TempInt] instantly to SB_OffPoint
              • Custom script: set bj_wantDestroyGroup=true
              • Unit Group - Pick every unit in (Units within 200.00 of SB_AreaPoint matching ((((Matching unit) is Magic Immune) Not equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of SB_Caster[SB_TempInt])) Equal to True)))) and do (Actions)
                • Loop - Actions
                  • Unit - Cause SB_Dummy[SB_TempInt] to damage (Picked unit), dealing 10.00 damage of attack type Spells and damage type Normal
                  • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\FlameStrike\FlameStrikeEmbers.mdl
                  • Special Effect - Destroy (Last created special effect)
              • Custom script: call RemoveLocation(udg_SB_OffPoint)
              • Custom script: call RemoveLocation(udg_SB_DummyPoint)
              • Custom script: call RemoveLocation(udg_SB_AreaPoint)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SB_Boolean[SB_TempInt] Equal to True
                • Then - Actions
                  • Lightning - Destroy SB_LightningEffect[SB_TempInt]
                  • Unit - Explode SB_Dummy[SB_TempInt]
                  • Set SB_Points = (Position of SB_Dummy[SB_TempInt])
                  • Unit - Create 1 Phoenix for (Owner of SB_Caster[SB_TempInt]) at SB_Points facing Default building facing degrees
                  • Unit - Add Solar Stun to (Last created unit)
                  • Unit - Set level of Solar Stun for (Last created unit) to SB_Level[SB_TempInt]
                  • Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
                  • Custom script: call RemoveLocation(udg_SB_Points)
                  • Custom script: call RemoveLocation(udg_SB_CasterPt[udg_SB_TempInt])
                  • Custom script: call RemoveLocation(udg_SB_TargetPoint[udg_SB_TempInt])
                  • Set SB_Boolean[SB_TempInt] = False
                  • Set SB_Index[SB_IndexLoop] = SB_Index[SB_IndexSize]
                  • Set SB_Index[SB_IndexSize] = SB_TempInt
                  • Set SB_IndexSize = (SB_IndexSize - 1)
                  • Set SB_IndexLoop = (SB_IndexLoop - 1)
                  • Unit Group - Remove SB_Caster[SB_TempInt] from SB_CasterGroup
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SB_IndexSize Equal to 0
                    • Then - Actions
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
                • Else - Actions
Credits

Big thanks to mckill2009 fix the leaks and bugs :p
Thanks JetFangInferno for fire nova model.
Thanks for Frankster of the OrbFire model.
Keywords:
Solar,Explosion,Fire,Ball,Solar Ball,Flame,
Contents

Solar Ball v1.0 (Map)

Reviews
12th Dec 2015 IcemanBo: For too long time as NeedsFix. Rejected. Although the spell is GUI, I'd say you should use AddLightningEx and MoveLightningEx so that the lightning is not on the ground. Add importing instructions into the map. You...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: For too long time as NeedsFix. Rejected.

Maker, 15th Aug 2011, Solar Ball v1.0

Although the spell is GUI, I'd say you should use AddLightningEx and MoveLightningEx so that the lightning is not on the ground.
Add importing instructions into the map.
You could use one less point variable.
For balace issues, the phoenox could be timed. Just a suggestion.
 
Here's a tip:
Once you've acquired a certain piece of data in a variable, always use that variable for the rest of the trigger because that'll be more efficient.
For example:
  • Set SB_Caster[SB_TempInt] = (Triggering unit)
    • Set SB_CasterPt[SB_TempInt] = (Position of (Triggering unit))
    • Set SB_TargetPoint[SB_TempInt] = (Target point of ability being cast)
    • Set SB_MaxDistance[SB_TempInt] = (Distance between SB_CasterPt[SB_TempInt] and SB_TargetPoint[SB_TempInt])
    • Set SB_MinDistance[SB_TempInt] = 0.00
    • Set SB_AngleDummy[SB_TempInt] = (Angle from SB_CasterPt[SB_TempInt] to SB_TargetPoint[SB_TempInt])
    • Set SB_Angle[SB_TempInt] = 0.00
    • Set SB_Boolean[SB_TempInt] = True
    • Set SB_Level[SB_TempInt] = (Level of (Ability being cast) for (Triggering unit))
    • Unit - Create 1 Dummy for (Triggering player) at SB_CasterPt[SB_TempInt] facing (Facing of SB_Caster[SB_TempInt]) degrees
    • Set SB_Dummy[SB_TempInt] = (Last created unit)
    • Unit - Turn collision for SB_Dummy[SB_TempInt] Off
    • Set SB_DummyPoint = (Position of SB_Dummy[SB_TempInt])
    • Set SB_AreaPoint = (SB_DummyPoint offset by 400.00 towards SB_Angle[SB_TempInt] degrees)
    • Lightning - Create a Finger of Death lightning effect from source SB_DummyPoint to target SB_AreaPoint
    • Set SB_LightningEffect[SB_TempInt] = (Last created lightning effect)
    • Unit Group - Add SB_Caster[SB_TempInt] to SB_CasterGroup
    • Custom script: call RemoveLocation(udg_SB_DummyPoint)
    • Custom script: call RemoveLocation(udg_SB_AreaPoint)
After setting that variable to (Triggering Unit), why are you still using "(Triggering Unit)" in the rest of
the trigger? You should be using the variable.

Also, don't use (Ability being Cast) because you already know what that ability is :p
Just use the ability here instead because that's much more efficient.

Also, you should be using custom scripts to add the lightning because you can give the lightning a bit of "Z" with it :D
native AddLightningEx takes string codeName, boolean checkVisibility, real x1, real y1, real z1, real x2, real y2, real z2 returns lightning
The codeName is a four letter code for the lightning type
In this case, Finger of Death refers to "AFOD"

so:

  • Custom script: set udg_SB_LightningEffect[SB_TempInt] = AddLightningEx("AFOD",false,GetLocationX(source location),GetLocationY(source location),32,GetLocationX(target location),GetLocationY(target location),32)
Yeah it's long, but it's better ^^

Also, throughout the triggers, whenever you create a unit, since you're reffering to Last Created Unit multiple times, why don't you create a temp unit variable and set that to (Last Created Unit) and use it
instead :)

That would be more efficient :D
 
Level 13
Joined
Oct 25, 2009
Messages
995
Here's a tip:
Once you've acquired a certain piece of data in a variable, always use that variable for the rest of the trigger because that'll be more efficient.
For example:
  • Set SB_Caster[SB_TempInt] = (Triggering unit)
    • Set SB_CasterPt[SB_TempInt] = (Position of (Triggering unit))
    • Set SB_TargetPoint[SB_TempInt] = (Target point of ability being cast)
    • Set SB_MaxDistance[SB_TempInt] = (Distance between SB_CasterPt[SB_TempInt] and SB_TargetPoint[SB_TempInt])
    • Set SB_MinDistance[SB_TempInt] = 0.00
    • Set SB_AngleDummy[SB_TempInt] = (Angle from SB_CasterPt[SB_TempInt] to SB_TargetPoint[SB_TempInt])
    • Set SB_Angle[SB_TempInt] = 0.00
    • Set SB_Boolean[SB_TempInt] = True
    • Set SB_Level[SB_TempInt] = (Level of (Ability being cast) for (Triggering unit))
    • Unit - Create 1 Dummy for (Triggering player) at SB_CasterPt[SB_TempInt] facing (Facing of SB_Caster[SB_TempInt]) degrees
    • Set SB_Dummy[SB_TempInt] = (Last created unit)
    • Unit - Turn collision for SB_Dummy[SB_TempInt] Off
    • Set SB_DummyPoint = (Position of SB_Dummy[SB_TempInt])
    • Set SB_AreaPoint = (SB_DummyPoint offset by 400.00 towards SB_Angle[SB_TempInt] degrees)
    • Lightning - Create a Finger of Death lightning effect from source SB_DummyPoint to target SB_AreaPoint
    • Set SB_LightningEffect[SB_TempInt] = (Last created lightning effect)
    • Unit Group - Add SB_Caster[SB_TempInt] to SB_CasterGroup
    • Custom script: call RemoveLocation(udg_SB_DummyPoint)
    • Custom script: call RemoveLocation(udg_SB_AreaPoint)
After setting that variable to (Triggering Unit), why are you still using "(Triggering Unit)" in the rest of
the trigger? You should be using the variable.

Also, don't use (Ability being Cast) because you already know what that ability is :p
Just use the ability here instead because that's much more efficient.

Also, you should be using custom scripts to add the lightning because you can give the lightning a bit of "Z" with it :D
native AddLightningEx takes string codeName, boolean checkVisibility, real x1, real y1, real z1, real x2, real y2, real z2 returns lightning
The codeName is a four letter code for the lightning type
In this case, Finger of Death refers to "AFOD"

so:

  • Custom script: set udg_SB_LightningEffect[SB_TempInt] = AddLightningEx("AFOD",false,GetLocationX(source location),GetLocationY(source location),32,GetLocationX(target location),GetLocationY(target location),32)
Yeah it's long, but it's better ^^

Also, throughout the triggers, whenever you create a unit, since you're reffering to Last Created Unit multiple times, why don't you create a temp unit variable and set that to (Last Created Unit) and use it
instead :)

That would be more efficient :D

Hmm,the lightning effect is error,i can't understand the custom script of lightning effect== :goblin_boom:
 
Level 11
Joined
Jul 9, 2009
Messages
926
GangSpear, here, I corrected the grammar on your tooltip and hopefully I guess it is more understandable :)

The caster creates a solar ball in front of him moving towards the target point. The pheonix regenerates it's health while travelling to the target point and burns the opponents it passes dealing minimal damage. Once it reaches the target point, the Pheonix will release a solar break dealing massive damage to all units near the target point.

hope I helped ;)
 
Top