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

Olympic Clubs 1.0

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
The enraged hero uses his old knowledge of mythology and conjuring up a power that creates six clubs giants, which are moved outside and will damage and stunning units across them.

Level: 1/2/3/4.

Damage: 75/150/225/300 points of impact.
Stun: 1.25/1.5/1.75/2 seconds.
Area of Effect: 500/600/700/800 units.

Cooldown: 10 seconds.
Mana Cost: 110/130/150/170 mana.

Keywords:
olympic, clubs, hammer, stun, much, dummy, mui, gui, trigger, easy, great, better, than, love, hiveworkshop, spell, no-target
Contents

Olympic Clubs (Map)

Reviews
12.12 IcemanBo: For long time as NeedsFix. Rejected. 12:11, 3rd Jun 2011 Maker: You need to use proper indexing method and turn off the looping trigger when there are no active instances of the spell.

Moderator

M

Moderator

12.12
IcemanBo: For long time as NeedsFix. Rejected.

12:11, 3rd Jun 2011
Maker: You need to use proper indexing method and turn off the looping trigger when there are no active instances of the spell.
 
Level 5
Joined
Feb 15, 2011
Messages
67
going to test spell

Triggers:
  • Olympic Clubs
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Olyimpic Clubs
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • A_IndexCaster[0] Equal to 0
        • Then - Actions
          • Trigger - Turn on Olympic Clubs Loop <gen>
        • Else - Actions
      • Set A_IndexCaster[0] = (A_IndexCaster[0] + 1)
      • Set A_IndexCaster[1] = (A_IndexCaster[1] + 1)
      • Set A_Caster[A_IndexCaster[1]] = (Triggering unit)
      • Set A_Distance[A_IndexCaster[1]] = (400.00 + (100.00 x (Real((Level of Olyimpic Clubs for A_Caster[A_IndexCaster[1]])))))
      • Set A_Velocity[A_IndexCaster[1]] = 20.00
      • Set A_Group[A_IndexCaster[1]] = (Random 0 units from (Units in (Playable map area)))
      • Set A_PointAction[A_IndexCaster[1]] = ((Position of A_Caster[A_IndexCaster[1]]) offset by 75.00 towards 0.00 degrees)
      • Set A_Point[A_IndexCaster[1]] = (Position of (Triggering unit))
      • For each (Integer A_IndexDummy[1]) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set A_Angle[A_IndexDummy[1]] = (60.00 x (Real(A_IndexDummy[1])))
          • Set A_Points[A_IndexDummy[1]] = ((Position of A_Caster[A_IndexCaster[1]]) offset by A_Distance[A_IndexCaster[1]] towards A_Angle[A_IndexDummy[1]] degrees)
          • Unit - Create 1 DummyMazo for (Owner of A_Caster[A_IndexCaster[1]]) at ((Position of A_Caster[A_IndexCaster[1]]) offset by 75.00 towards A_Angle[A_IndexDummy[1]] degrees) facing (Angle from (Position of A_Caster[A_IndexCaster[1]]) to A_Points[A_IndexDummy[1]]) degrees
          • Set A_Dummy[((A_IndexDummy[1] x 6) - A_IndexCaster[1])] = (Last created unit)
      • Set A_On_Off[A_IndexCaster[1]] = True
  • Olympic Clubs Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A_IndexCaster[2]) from 1 to A_IndexCaster[1], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • A_On_Off[A_IndexCaster[2]] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between A_Point[A_IndexCaster[2]] and A_PointAction[A_IndexCaster[2]]) Less than A_Distance[A_IndexCaster[2]]
                • Then - Actions
                  • Set A_PointAction[A_IndexCaster[2]] = (A_PointAction[A_IndexCaster[2]] offset by A_Velocity[A_IndexCaster[2]] towards 0.00 degrees)
                  • For each (Integer A_IndexDummy[2]) from 1 to 6, do (Actions)
                    • Loop - Actions
                      • Unit - Move A_Dummy[((A_IndexDummy[2] x 6) - A_IndexCaster[2])] instantly to ((Position of A_Dummy[((A_IndexDummy[2] x 6) - A_IndexCaster[2])]) offset by A_Velocity[A_IndexCaster[2]] towards A_Angle[A_IndexDummy[2]] degrees), facing A_Points[A_IndexDummy[2]]
                      • Unit Group - Pick every unit in (Units within 100.00 of (Position of A_Dummy[((A_IndexDummy[2] x 6) - A_IndexCaster[2])])) and do (Actions)
                        • Loop - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • And - All (Conditions) are true
                                • Conditions
                                  • ((Picked unit) is in A_Group[A_IndexCaster[2]]) Equal to False
                                  • ((Picked unit) is alive) Equal to True
                                  • ((Picked unit) belongs to an enemy of (Owner of A_Caster[A_IndexCaster[2]])) Equal to True
                            • Then - Actions
                              • Unit - Create 1 DummyCaster for (Owner of A_Caster[A_IndexCaster[2]]) at (Position of (Picked unit)) facing Default building facing degrees
                              • Unit - Set level of Cast Olympic for (Last created unit) to (Level of Olyimpic Clubs for A_Caster[A_IndexCaster[2]])
                              • Custom script: call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", GetEnumUnit() )
                              • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                              • Unit Group - Add (Picked unit) to A_Group[A_IndexCaster[2]]
                            • Else - Actions
                • Else - Actions
                  • For each (Integer A_IndexDummy[2]) from 1 to 6, do (Actions)
                    • Loop - Actions
                      • Unit - Kill A_Dummy[((A_IndexDummy[2] x 6) - A_IndexCaster[2])]
            • Else - Actions
again cant make hidden
 
Level 5
Joined
Nov 17, 2010
Messages
28
going to test spell

Triggers:
  • Olympic Clubs
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Olyimpic Clubs
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • A_IndexCaster[0] Equal to 0
        • Then - Actions
          • Trigger - Turn on Olympic Clubs Loop <gen>
        • Else - Actions
      • Set A_IndexCaster[0] = (A_IndexCaster[0] + 1)
      • Set A_IndexCaster[1] = (A_IndexCaster[1] + 1)
      • Set A_Caster[A_IndexCaster[1]] = (Triggering unit)
      • Set A_Distance[A_IndexCaster[1]] = (400.00 + (100.00 x (Real((Level of Olyimpic Clubs for A_Caster[A_IndexCaster[1]])))))
      • Set A_Velocity[A_IndexCaster[1]] = 20.00
      • Set A_Group[A_IndexCaster[1]] = (Random 0 units from (Units in (Playable map area)))
      • Set A_PointAction[A_IndexCaster[1]] = ((Position of A_Caster[A_IndexCaster[1]]) offset by 75.00 towards 0.00 degrees)
      • Set A_Point[A_IndexCaster[1]] = (Position of (Triggering unit))
      • For each (Integer A_IndexDummy[1]) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set A_Angle[A_IndexDummy[1]] = (60.00 x (Real(A_IndexDummy[1])))
          • Set A_Points[A_IndexDummy[1]] = ((Position of A_Caster[A_IndexCaster[1]]) offset by A_Distance[A_IndexCaster[1]] towards A_Angle[A_IndexDummy[1]] degrees)
          • Unit - Create 1 DummyMazo for (Owner of A_Caster[A_IndexCaster[1]]) at ((Position of A_Caster[A_IndexCaster[1]]) offset by 75.00 towards A_Angle[A_IndexDummy[1]] degrees) facing (Angle from (Position of A_Caster[A_IndexCaster[1]]) to A_Points[A_IndexDummy[1]]) degrees
          • Set A_Dummy[((A_IndexDummy[1] x 6) - A_IndexCaster[1])] = (Last created unit)
      • Set A_On_Off[A_IndexCaster[1]] = True
  • Olympic Clubs Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A_IndexCaster[2]) from 1 to A_IndexCaster[1], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • A_On_Off[A_IndexCaster[2]] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between A_Point[A_IndexCaster[2]] and A_PointAction[A_IndexCaster[2]]) Less than A_Distance[A_IndexCaster[2]]
                • Then - Actions
                  • Set A_PointAction[A_IndexCaster[2]] = (A_PointAction[A_IndexCaster[2]] offset by A_Velocity[A_IndexCaster[2]] towards 0.00 degrees)
                  • For each (Integer A_IndexDummy[2]) from 1 to 6, do (Actions)
                    • Loop - Actions
                      • Unit - Move A_Dummy[((A_IndexDummy[2] x 6) - A_IndexCaster[2])] instantly to ((Position of A_Dummy[((A_IndexDummy[2] x 6) - A_IndexCaster[2])]) offset by A_Velocity[A_IndexCaster[2]] towards A_Angle[A_IndexDummy[2]] degrees), facing A_Points[A_IndexDummy[2]]
                      • Unit Group - Pick every unit in (Units within 100.00 of (Position of A_Dummy[((A_IndexDummy[2] x 6) - A_IndexCaster[2])])) and do (Actions)
                        • Loop - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • And - All (Conditions) are true
                                • Conditions
                                  • ((Picked unit) is in A_Group[A_IndexCaster[2]]) Equal to False
                                  • ((Picked unit) is alive) Equal to True
                                  • ((Picked unit) belongs to an enemy of (Owner of A_Caster[A_IndexCaster[2]])) Equal to True
                            • Then - Actions
                              • Unit - Create 1 DummyCaster for (Owner of A_Caster[A_IndexCaster[2]]) at (Position of (Picked unit)) facing Default building facing degrees
                              • Unit - Set level of Cast Olympic for (Last created unit) to (Level of Olyimpic Clubs for A_Caster[A_IndexCaster[2]])
                              • Custom script: call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", GetEnumUnit() )
                              • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                              • Unit Group - Add (Picked unit) to A_Group[A_IndexCaster[2]]
                            • Else - Actions
                • Else - Actions
                  • For each (Integer A_IndexDummy[2]) from 1 to 6, do (Actions)
                    • Loop - Actions
                      • Unit - Kill A_Dummy[((A_IndexDummy[2] x 6) - A_IndexCaster[2])]
            • Else - Actions
again cant make hidden

How dow you convert the trigger to this? :S:S:, teachme please, oh! I'm not english, and I'm not good with the languaje sorry for the mistakes.
 
Level 4
Joined
Nov 24, 2010
Messages
61
going to test spell

Triggers:
  • Olympic Clubs
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Olyimpic Clubs
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • A_IndexCaster[0] Equal to 0
        • Then - Actions
          • Trigger - Turn on Olympic Clubs Loop <gen>
        • Else - Actions
      • Set A_IndexCaster[0] = (A_IndexCaster[0] + 1)
      • Set A_IndexCaster[1] = (A_IndexCaster[1] + 1)
      • Set A_Caster[A_IndexCaster[1]] = (Triggering unit)
      • Set A_Distance[A_IndexCaster[1]] = (400.00 + (100.00 x (Real((Level of Olyimpic Clubs for A_Caster[A_IndexCaster[1]])))))
      • Set A_Velocity[A_IndexCaster[1]] = 20.00
      • Set A_Group[A_IndexCaster[1]] = (Random 0 units from (Units in (Playable map area)))
      • Set A_PointAction[A_IndexCaster[1]] = ((Position of A_Caster[A_IndexCaster[1]]) offset by 75.00 towards 0.00 degrees)
      • Set A_Point[A_IndexCaster[1]] = (Position of (Triggering unit))
      • For each (Integer A_IndexDummy[1]) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set A_Angle[A_IndexDummy[1]] = (60.00 x (Real(A_IndexDummy[1])))
          • Set A_Points[A_IndexDummy[1]] = ((Position of A_Caster[A_IndexCaster[1]]) offset by A_Distance[A_IndexCaster[1]] towards A_Angle[A_IndexDummy[1]] degrees)
          • Unit - Create 1 DummyMazo for (Owner of A_Caster[A_IndexCaster[1]]) at ((Position of A_Caster[A_IndexCaster[1]]) offset by 75.00 towards A_Angle[A_IndexDummy[1]] degrees) facing (Angle from (Position of A_Caster[A_IndexCaster[1]]) to A_Points[A_IndexDummy[1]]) degrees
          • Set A_Dummy[((A_IndexDummy[1] x 6) - A_IndexCaster[1])] = (Last created unit)
      • Set A_On_Off[A_IndexCaster[1]] = True
  • Olympic Clubs Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A_IndexCaster[2]) from 1 to A_IndexCaster[1], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • A_On_Off[A_IndexCaster[2]] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between A_Point[A_IndexCaster[2]] and A_PointAction[A_IndexCaster[2]]) Less than A_Distance[A_IndexCaster[2]]
                • Then - Actions
                  • Set A_PointAction[A_IndexCaster[2]] = (A_PointAction[A_IndexCaster[2]] offset by A_Velocity[A_IndexCaster[2]] towards 0.00 degrees)
                  • For each (Integer A_IndexDummy[2]) from 1 to 6, do (Actions)
                    • Loop - Actions
                      • Unit - Move A_Dummy[((A_IndexDummy[2] x 6) - A_IndexCaster[2])] instantly to ((Position of A_Dummy[((A_IndexDummy[2] x 6) - A_IndexCaster[2])]) offset by A_Velocity[A_IndexCaster[2]] towards A_Angle[A_IndexDummy[2]] degrees), facing A_Points[A_IndexDummy[2]]
                      • Unit Group - Pick every unit in (Units within 100.00 of (Position of A_Dummy[((A_IndexDummy[2] x 6) - A_IndexCaster[2])])) and do (Actions)
                        • Loop - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • And - All (Conditions) are true
                                • Conditions
                                  • ((Picked unit) is in A_Group[A_IndexCaster[2]]) Equal to False
                                  • ((Picked unit) is alive) Equal to True
                                  • ((Picked unit) belongs to an enemy of (Owner of A_Caster[A_IndexCaster[2]])) Equal to True
                            • Then - Actions
                              • Unit - Create 1 DummyCaster for (Owner of A_Caster[A_IndexCaster[2]]) at (Position of (Picked unit)) facing Default building facing degrees
                              • Unit - Set level of Cast Olympic for (Last created unit) to (Level of Olyimpic Clubs for A_Caster[A_IndexCaster[2]])
                              • Custom script: call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", GetEnumUnit() )
                              • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                              • Unit Group - Add (Picked unit) to A_Group[A_IndexCaster[2]]
                            • Else - Actions
                • Else - Actions
                  • For each (Integer A_IndexDummy[2]) from 1 to 6, do (Actions)
                    • Loop - Actions
                      • Unit - Kill A_Dummy[((A_IndexDummy[2] x 6) - A_IndexCaster[2])]
            • Else - Actions
again cant make hidden

See? I make that thing hidden!

How dow you convert the trigger to this? :S:S:, teachme please, oh! I'm not english, and I'm not good with the languaje sorry for the mistakes.

Right-Click on the trigger name above "Event" in World Editor/Trigger, Select "Copy as Text". In the forum text field, press the button
folder.gif
(or type [TRIGGER] [/TRIGGER]) and paste in the middle.
 
Last edited:
Level 10
Joined
Apr 25, 2009
Messages
296
I don't think your recycling method is working... if you cast this spell 8000ish times, bad things will happen. Also, it will lagg quite a bit before this happens.

I'd suggest changing 'Last Created Unit' to a variable, as its more efficient.

For dummy units, make the dummy explode on death. Apparently, it stops a leak.

  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units within 100.00 of (Position of A_Dummy[((A_IndexDummy[2] x 6) - A_IndexCaster[2])])) and do (Actions)
That nullifies the unit group leak.

Also, I don't think you turn off the loop when its not in use. Please do so, as there's no point in having it run when there's nothing for it to do.

I don't see you removing the points. That'll mean you leak *quite* a few points per cast, which means lagg. And leak is frowned upon in our community.


Any questions? Please PM me.
 

Vil

Vil

Level 2
Joined
Jul 25, 2010
Messages
2
Interesting ability
But with a glitch
It is possible to add in the trigger Olympic Clubs lines right at the beginning of the trigger:

set udg_A_IndexCaster[0] = 0
set udg_A_IndexCaster[1] = 0
set udg_A_IndexDummy[1] = 0
set udg_A_IndexDummy[2] = 0

Then the problem of a doll of a hammer remaining after where that 7 uses of ability vanishes
In the trigger Olympic Clubs Loop it is possible to add the counter with a condition of switching-off of this 0.03 second cycles
For example

function Trig_Olympic_Clubs_Loop_Func002001 takes nothing returns boolean
return ( udg_ZTrOff == 60 )
endfunction

function Trig_Olympic_Clubs_Loop_Actions takes nothing returns nothing
set udg_ZTrOff = ( udg_ZTrOff + 1 )
if ( Trig_Olympic_Clubs_Loop_Func002001() ) then
call DisableTrigger( gg_trg_Olympic_Clubs_Loop )
else
call DoNothing( )
endif
endfunction

//===========================================================================
function InitTrig_Olympic_Clubs_Loop takes nothing returns nothing
set gg_trg_Olympic_Clubs_Loop = CreateTrigger( )
call DisableTrigger( gg_trg_Olympic_Clubs_Loop )
call TriggerRegisterTimerEventPeriodic( gg_trg_Olympic_Clubs_Loop, 0.03 )
call TriggerAddAction( gg_trg_Olympic_Clubs_Loop, function Trig_Olympic_Clubs_Loop_Actions )
endfunction
 
Level 7
Joined
Apr 12, 2011
Messages
124
Leaks special effects/clearup fails.
I just try spells "Test Map" and play em for a while.
The spell seems fine but after a few casts this happen:
And the spell stops to deal damage other than 1 or 2 of the missiles.

Suggest you take a good look to your code if you'd like to get approved. :p
 

Attachments

  • Olympic Clubs leak.jpg
    Olympic Clubs leak.jpg
    609.7 KB · Views: 93
Top