1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  5. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  6. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  7. The results are out! Check them out.
    Dismiss Notice
  8. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  9. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  10. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Spiritual Charge V1.1b

Submitted by Sandbox Rpg
This bundle is marked as approved. It works and satisfies the submission rules.
Spiritual Charge

This spell, when cast, calls upon a portion of the casters spirit to charge towards the targeted point. Every 250 units travelled, the spirit will stomp the ground, damaging and slowing nearby enemy units. Upon reaching the targeted point, the spirit will execute an echoing finale before instantly returning to the caster.

As far as I can tell this is MUI and Leakless

Currently having problems after changing from timer variable to real variable

Fixed, it's MUI and leakless again

Triggers
[trigger=Cast]Spiritual Charge
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Spiritual Charge
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SC_Index1 Equal to 0
Then - Actions
Trigger - Turn on Spiritual Charge Loop <gen>
Else - Actions
Set SC_Index1 = (SC_Index1 + 1)
Set SC_Index2 = (SC_Index2 + 1)
Set SC_Boolean[SC_Index2] = True
Set SC_Caster[SC_Index2] = (Triggering unit)
Set SC_CasterLoc[SC_Index2] = (Position of (Triggering unit))
Set SC_EchoingFinale[SC_Index2] = False
Set SC_Counter[SC_Index2] = 1
Set SC_Level[SC_Index2] = (Level of (Ability being cast) for (Triggering unit))
Set SC_Damage[SC_Index2] = (((Real(SC_Index2)) x 80.00) + 120.00)
Set SC_TargetLoc[SC_Index2] = (Target point of ability being cast)
Unit - Create 1 Dummy Spirit for Owner of Triggering unit at SC_CasterLoc[SC_Index2] facing (Angle from SC_CasterLoc[SC_Index2] to SC_TargetLoc[SC_Index2]) degrees
Animation - Change (Last created unit)'s vertex coloring to (100.00%, 100.00%, 0.00%) with 50.00% transparency
Set SC_Spirit[SC_Index2] = (Last created unit)
Set SC_SpiritLoc[SC_Index2] = (Position of (Last created unit))
Unit - Order SC_Spirit[SC_Index2] to Move To SC_TargetLoc[SC_Index2]

[/trigger]​
[trigger= Loop]Spiritual Charge Loop
Events
Time - Every 0.04 seconds of game time
Conditions
Actions
Spiritual Charge Loop
Events
Time - Every 0.04 seconds of game time
Conditions
Actions
For each (Integer SC_Index3) from 1 to SC_Index2, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SC_Boolean[SC_Index3] Equal to True
Then - Actions
Set A_Temp_Loc = (Position of SC_Spirit[SC_Index3])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between A_Temp_Loc and SC_SpiritLoc[SC_Index3]) Greater than or equal to 250.00
Then - Actions
Unit - Create 1 Dummy Caster for (Owner of SC_Caster[SC_Index3]) at A_Temp_Loc facing Default building facing degrees
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
Unit - Add Spitirual Resonance to (Last created unit)
Unit - Set level of Spitirual Resonance for (Last created unit) to SC_Level[SC_Index3]
Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
Special Effect - Create a special effect at A_Temp_Loc using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation(udg_SC_SpiritLoc[udg_SC_Index3])
Set SC_SpiritLoc[SC_Index3] = (Position of SC_Spirit[SC_Index3])
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between A_Temp_Loc and SC_TargetLoc[SC_Index3]) Less than or equal to 50.00
Then - Actions
Set SC_Boolean[SC_Index3] = False
Set SC_EchoingFinale[SC_Index3] = True
Animation - Change SC_Spirit[SC_Index3]'s animation speed to 470.00% of its original speed
Countdown Timer - Start SC_Timer[SC_Index3] as a One-shot timer that will expire in 1.96 seconds
Else - Actions
Custom script: call RemoveLocation(udg_A_Temp_Loc)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SC_EchoingFinale[SC_Index3] Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Elapsed time for SC_Timer[SC_Index3]) Greater than or equal to (0.24 x (Real(SC_Counter[SC_Index3])))
Then - Actions
Set SC_Counter[SC_Index3] = (SC_Counter[SC_Index3] + 1)
Animation - Play SC_Spirit[SC_Index3]'s attack slam animation
Special Effect - Create a special effect at SC_TargetLoc[SC_Index3] using war3mapImported\FireNova2.mdx
Special Effect - Destroy (Last created special effect)
Set A_Temp_Group = (Units within 450.00 of SC_TargetLoc[SC_Index3] matching (((Matching unit) belongs to an enemy of (Owner of SC_Caster[SC_Index3])) Equal to True))
Unit Group - Pick every unit in A_Temp_Group and do (Unit - Cause SC_Caster[SC_Index3] to damage (Picked unit), dealing SC_Damage[SC_Index3] damage of attack type Spells and damage type Normal)
Custom script: call DestroyGroup(udg_A_Temp_Group)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(SC_Counter[SC_Index3] Equal to 9) or ((Elapsed time for SC_Timer[SC_Index3]) Greater than or equal to 1.92)
Then - Actions
Unit - Remove SC_Spirit[SC_Index3] from the game
Set SC_EchoingFinale[SC_Index3] = False
Custom script: call RemoveLocation(udg_SC_SpiritLoc[udg_SC_Index3])
Custom script: call RemoveLocation(udg_SC_CasterLoc[udg_SC_Index3])
Custom script: call RemoveLocation(udg_SC_TargetLoc[udg_SC_Index3])
Set SC_Index1 = (SC_Index1 - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SC_Index1 Equal to 0
Then - Actions
Set SC_Index2 = 0
Trigger - Turn off (This trigger)
Else - Actions
Else - Actions
Else - Actions
Else - Actions

[/trigger]​
[trigger= Remove Unit Leak]Remove Unit Leak
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Dummy Caster
Actions
Unit - Remove (Triggering unit) from the game
[/trigger]​


I generally make pretty heavy use of "A_Temp_Loc" and "A_Temp_Loc2". If this is a problem in these maps please tell me.

First spell i've ever uploaded on THW, please give construtive feedback if possible.

My comments

Unless you have no clue how to use GUI, changing things like damage, range etc. shouldn't be too hard.

You will have to make your own dummy spirit that has the same model as caster however, and in the event of multiple models having the option of casting this spell, having an extra If/Then/Else action for each extra model in addition to the extra dummy units will be required.

Credits! (Well, just one.)

To JetFangInferno for the impossibly awesome Fire Nova model.

Keywords:
Spiritual Charge, Charge, Spirit, Echoing, Finale, Echoing Finale, Ghostly, Yellow, Ghostly Yellow Copy of Caster.
Contents

Spiritual Charge (Map)

Reviews
Moderator
16:40, 29th Sep 2010 The_Reborn_Devil: You're not recycling correctly, but as long as the spell isn't casted 8192 times after each other without letting the last cast end then there won't be a problem. Status: Approved Rating: Useful
  1. Sandbox Rpg

    Sandbox Rpg

    Joined:
    Jun 9, 2010
    Messages:
    30
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Fixed, can it get approved? I THINK I've made all the changes.
     
  2. Bankde

    Bankde

    Joined:
    Jul 24, 2010
    Messages:
    75
    Resources:
    0
    Resources:
    0
    Really great ideas and also coding. Not sure that this have been fixed in rare problem of indexing or not but as I use the spell, it work really well and MUI.

    I think from this code you may use only 1 If/then/else with "AND" function.

    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • SC_EchoingFinale[SC_Index3] Equal to True
      • Then - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Elapsed time for SC_Timer[SC_Index3]) Greater than or equal to (0.24 x (Real(SC_Counter[SC_Index3])))
          • Then - Actions
            • .............................................


    And can't you change "Player" , too ? I have seen many people saying this.

    • Unit - Create 1 Dummy Spirit for Player 1 (Red) at SC_CasterLoc[SC_Index2] facing (Angle from SC_CasterLoc[SC_Index2] to SC_TargetLoc[SC_Index2]) degrees


    A little smaller of ending effect model would be great.
    +rep and 5/5 Great update. :cgrin:
     
  3. Sandbox Rpg

    Sandbox Rpg

    Joined:
    Jun 9, 2010
    Messages:
    30
    Resources:
    1
    Spells:
    1
    Resources:
    1
    What were you saying OffGraphic? :grin:

    Must of missed that one. Thanks for vote, rep and spotting the mistake.
     
  4. HaniBon

    HaniBon

    Joined:
    Apr 25, 2009
    Messages:
    464
    Resources:
    0
    Resources:
    0
    You use imported models, makes the effects look good, but using imported models makes import of the spell harder = not good. Just so you know.
     
  5. Sandbox Rpg

    Sandbox Rpg

    Joined:
    Jun 9, 2010
    Messages:
    30
    Resources:
    1
    Spells:
    1
    Resources:
    1
    And yet when I use this spell it always works fine.... You seem to be the only one who keeps complaining that it's not working for you. Also, are you sure your not just going over the index loop limit?
     
  6. Bankde

    Bankde

    Joined:
    Jul 24, 2010
    Messages:
    75
    Resources:
    0
    Resources:
    0
    For me, it's ok to have some non-MUI problem when using INDEX. I've also encountered one and it's impossible to change code because all the code is already correct and that problem is really really rare to occur once. If you really want COMPLETE-MUI, use hashtable or Jass. :goblin_yeah:
     
  7. Bankde

    Bankde

    Joined:
    Jul 24, 2010
    Messages:
    75
    Resources:
    0
    Resources:
    0
    I've seen your spell. Some are really great like Fireball (I love that !! +rep)

    :goblin_yeah:

    But for other spell like Time stop and Hydrogen ball, it isn't MUI at all when testing it (Special Effect is MUI but not its damage/effect)

    You are LYING, you didn't really use Indexing. You use "Pick every units in unit group" which is the basic of using Hashtables.

    Basic of indexing is starting with "For each integer" not "Pick every units".
     
  8. Sandbox Rpg

    Sandbox Rpg

    Joined:
    Jun 9, 2010
    Messages:
    30
    Resources:
    1
    Spells:
    1
    Resources:
    1
    The fact is Offgraphic, you are the only one saying that your stuff.

    Also "Pick every unit in unit group" is pretty much the basis of the loop parts of hashtable spells... check Spells in Hashtables if you don't believe me, all the of the loops first action is "Pick every unit in unit group", so your claim that "Pick every unit in unit group" has nothing to do with hashtables is simply false.

    Also, this is my first spell ever, just like your hydrogen bomb. Except that I'm not claiming that fact means it's ok to be bad.

    And your "Drown" spell is still under work after 3 months!

    So you know, shut up about my spells, and work on your own spells please.....
     
  9. Sandbox Rpg

    Sandbox Rpg

    Joined:
    Jun 9, 2010
    Messages:
    30
    Resources:
    1
    Spells:
    1
    Resources:
    1
    I know, but you were saying that it has nothing at all to do with hashtables, which isn't true.

    How has that got anything to do with what is said?
     
  10. Sandbox Rpg

    Sandbox Rpg

    Joined:
    Jun 9, 2010
    Messages:
    30
    Resources:
    1
    Spells:
    1
    Resources:
    1
    About the the spellpack, I was referring to the fact that any spell using hashtables will almost always use "Pick every unit in unit group".

    And yes, I can take criticisms. What I can't take, is someone constantly berating me that my spell isn't perfect when his spells aren't any better.

    Also, I can't help but notice you ignored my mentioning of Drown.
     
  11. Cihparg

    Cihparg

    Joined:
    Jul 4, 2008
    Messages:
    958
    Resources:
    1
    Models:
    1
    Resources:
    1
    - Thread cleared of my posts. -

    EDIT: Posting a report of how many times this spell actually supports to be cast.
    EDIT: Appears that you are overusing effects/dummies. Use less, improve your triggering a lot.
    I could do this spell way better, but cannot - As you are doing it.
     
    Last edited: Oct 2, 2010
  12. DarthDeath

    DarthDeath

    Joined:
    Dec 9, 2009
    Messages:
    12
    Resources:
    0
    Resources:
    0
    sandbox, why the dummy is the hero? :vw_wtf: