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

Spiritual Charge V1.1b

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

[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
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

Moderator

M

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
 
Level 3
Joined
Jun 9, 2010
Messages
33
You messed up at the dummy creation, you create it for player 1 red, unless you don't care, usually I either create it for neutral passive or the owner of the casting unit

Oh yes! I forgot about that, thanks for spotting it. Updated map and description.

looks original at some extent
which makes me give it a 4/5 rating and give you some cookies!

Thanks :D!
 
Level 3
Joined
Jun 9, 2010
Messages
33
The fact that it damages allied units as well is done on purpose, as this was made with the intention of it being some kind of initiating spell. If you think it's better off not damaging allied units I'll change it.

Edit: Also, how many spells does a spellpack have to have?
 
Last edited:
Level 19
Joined
Feb 4, 2009
Messages
1,313
damage circular area is said to kill mac users so you should not use it

instead of disabeling collision you should make the dummy fly so he will run the shortest path and not the longest if it is more pathable as the shortest way

you also should remove the timer and make a real variable and increase it
  • (Elapsed time for SC_Timer[SC_Index[3]]) Equal to 0.24
should be
  • (SC_Duration[SC_Index[3]] mod 0.24) Equal to 0.00
or you could just count from 0 to 0.24 and reset it to 0 if it was 0.24

array variables are a little bit slower than normal ones so it will speed things up if you use Index1, Index2, Index3, etc. and not Index[1], Index[2],... if the variable is used often

also you shoud give credits to JetFangInferno for his model in both your map and in this thread
http://www.hiveworkshop.com/forums/models-530/fire-nova-50408/
 
The fact that it damages allied units as well is done on purpose, as this was made with the intention of it being some kind of initiating spell. If you think it's better off not damaging allied units I'll change it.

Edit: Also, how many spells does a spellpack have to have?

IDK, but I think at least 2 spells...

on your spell, looks good but maybe just add the option to whether damage allies or not.
 
Level 3
Joined
Jun 9, 2010
Messages
33
To D4RK_G4ND4LF: Updated map with real variable and given credits. Thanks for reminding me about credits and for the real variable method.

To Adiktuz:
2 spells? good, I'm making one with 3 at the moment.

On-topic, well considering what D4RK_G4ND4LF said about circle killing mac users, I'll just make it damage enemies.
 
Level 3
Joined
Jun 9, 2010
Messages
33
This spell is far away from MUI, it's not even SUI.
MUI = Multi Unit Instancibility.
SUI = Single unit instancibility.

Hmm... must of been a problem after changing a couple of things. I'l check to see if i can fix it.

Edit: Ok i've figured out the problem. D4RK_G4ND4LF, can you tell me exactly how using a real variable + modulo works? Because that seems to be the source of the problem, as it's also causing another spell of mine that i'm making not work, and they both have the same problem. Until then I'll switch back to timer variable.
 
Level 3
Joined
Jun 9, 2010
Messages
33
I can send you examble map.

Here: View attachment 88046

It seems that after 99 casts in a row, like in that map, the second part of the trigger, the one after, and including,
  • SC_EchoingFinale[SC_Index[3]] Equal to True
just stops working. Now I'm afraid I don't know what happens in that case. I looked through it, and I just can't tell what the problem is...

Edit: The only thing I can think of is that if an array is skipped, but don't see how that would work.
 
Last edited:
Level 3
Joined
Jun 9, 2010
Messages
33
You'r triggering is so messy that I can't find the cause =/

Gee, thanks -.- real ego-booster there.

Anyway, whatever the cause is, it doesn't seem to be very severe, as after some further testing I realized it just, effectively, reduces the number of arrays by 1. I set the number of arrays for each variable to 200, doubled the number of times he casts SC, and lo and behold, only 1 dummy was left.

Edit: In fact, after putting a 25 sec delay between 2 waves of 100 casts with the variable array set to 200, no dummies were left.
 
Level 4
Joined
Jul 24, 2010
Messages
85
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:
 
Level 3
Joined
Jun 9, 2010
Messages
33
Really great ideas and also coding.

What were you saying OffGraphic? :grin:

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

Must of missed that one. Thanks for vote, rep and spotting the mistake.
 
Level 9
Joined
Apr 25, 2009
Messages
468
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.
 
Level 4
Joined
Jul 24, 2010
Messages
85
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?

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:
 
Level 4
Joined
Jul 24, 2010
Messages
85
Everything i've made is fully MUI.
I use indexing. - Hashtables are for babies.

Same with Jass.
I use Jass. - vJass/Zinc/cJass is for babies.

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".
 
Level 3
Joined
Jun 9, 2010
Messages
33
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.....
 
Level 3
Joined
Jun 9, 2010
Messages
33
"Pick every unit in a unit group" is a group function. It has nothing to do with hashtables.
It can tho, be used in anything you want.

I know, but you were saying that it has nothing at all to do with hashtables, which isn't true.

And you do realize, that user made content has nothing to do with blizzard's functions?

How has that got anything to do with what is said?
 
Level 3
Joined
Jun 9, 2010
Messages
33
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.
 
Top