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

Chaotic Sphere v1.2

Chaotic Sphere


General:


MUI: Yes
MCI: Yes (1 unit can cast the spell multiple times)
Requirements: Patch 1.24
Imported Material: No
Included Guides: General Info, How to Import, Troubleshooting, how to change the appearance/values + Comments in the triggers.

This spell is a combination between:
  1. A shockwave
  2. An AoE-spell
  3. a spell which fires multiple missiles.
I don't really know why I named it "Chaotic Sphere", I just thought it sounded different than "Unholy Blast", or something along those lines.
It does make a half spheric shape at one point, though...

Description:


Chaotic Sphere is a unit-target spell.
A shockwave will be sent towards the targetted unit, but will go a bit further, once behind the target, it will explode, dealing damage to all nearby units and a few smaller missiles will spawn.
Thse missiles will go to the targetted unit in something I describe as a "Double Arc" (an XY-arc and a Z-arc), once they hit the unit, they will also deal damage.

The default damage formula is:

Shockwave: (20 + 10 x Spell Level) + (int x 2)
Explosion: (Spell Level) x Int
Missile: ((Spell Level x 25) / 3) + (int / 2)


In-game screenshots:


Here is a stupid gif I've made... (it doesn't show all effects, but it's the best I could do within 10 minutes -.-).

chaoticsphere.gif


And here are some screenshots of how it actually looks (in the correct order)
- Screenshots are taken on an empty terrain, the current spell looks exactly the same, though.


chaoticsphere3.jpg


chaoticsphere1.jpg


chaoticsphere2.jpg



chaoticsphere4.jpg



Triggers:


I won't show the init-trigger, as it only contains 2 actions to set up the hashtable...
All comments are also not included



  • Sphere | Spell Init
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Chaotic Sphere
    • Actions
      • Set Sloc[1] = (Position of (Triggering unit))
      • Set Sloc[2] = (Position of (Target unit of ability being cast))
      • Set SphereValue[1] = ((Integer((Distance between Sloc[1] and Sloc[2]))) + 300)
      • Set SphereValue[2] = ((Level of Chaotic Sphere for (Triggering unit)) x (Intelligence of (Triggering unit) (Include bonuses)))
      • Set SphereValue[3] = ((20 + (10 x (Level of Chaotic Sphere for (Triggering unit)))) + ((Intelligence of (Triggering unit) (Include bonuses)) x 2))
      • Set SphereValue[4] = ((((Level of Chaotic Sphere for (Triggering unit)) x 25) / 3) + ((Intelligence of (Triggering unit) (Include bonuses)) / 2))
      • Set SphereValue[5] = (1 + (Level of Chaotic Sphere for (Triggering unit)))
      • Unit - Create 1 Sphere Missile 1 for (Owner of (Triggering unit)) at Sloc[1] facing (Angle from Sloc[1] to Sloc[2]) degrees
      • Unit Group - Add (Last created unit) to MissileGroup1
      • Unit Group - Remove all units from SphereDamage
      • Unit Group - Add (Triggering unit) to SphereDamage
      • Hashtable - Save SphereValue[1] as 0 of (Key (Triggering unit)) in SphereTable
      • Hashtable - Save SphereValue[2] as 1 of (Key (Triggering unit)) in SphereTable
      • Hashtable - Save SphereValue[3] as 2 of (Key (Triggering unit)) in SphereTable
      • Hashtable - Save SphereValue[4] as 3 of (Key (Triggering unit)) in SphereTable
      • Hashtable - Save SphereValue[5] as 4 of (Key (Triggering unit)) in SphereTable
      • Hashtable - Save 0 as 5 of (Key (Triggering unit)) in SphereTable
      • Hashtable - Save Handle Of(Triggering unit) as 6 of (Key (Last created unit)) in SphereTable
      • Hashtable - Save Handle OfSphereDamage as 7 of (Key (Last created unit)) in SphereTable
      • Hashtable - Save Handle Of(Target unit of ability being cast) as 8 of (Key (Triggering unit)) in SphereTable
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in MissileGroup1) Equal to 1
        • Then - Actions
          • Trigger - Turn on Sphere I Move 1 <gen>
        • Else - Actions
      • Custom script: call RemoveLocation(udg_Sloc[1])
      • Custom script: call RemoveLocation(udg_Sloc[2])

  • Sphere | Move 1
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in MissileGroup1 and do (Actions)
        • Loop - Actions
          • Set SphereValue[1] = (Load 0 of (Key (Load 6 of (Key (Picked unit)) in SphereTable)) from SphereTable)
          • Set SphereValue[2] = (Load 1 of (Key (Load 6 of (Key (Picked unit)) in SphereTable)) from SphereTable)
          • Set SphereValue[3] = (Load 2 of (Key (Load 6 of (Key (Picked unit)) in SphereTable)) from SphereTable)
          • Set SphereValue[6] = (Load 5 of (Key (Load 6 of (Key (Picked unit)) in SphereTable)) from SphereTable)
          • Set SphereCaster = (Load 6 of (Key (Picked unit)) in SphereTable)
          • Set SphereDamage = (Load 7 of (Key (Picked unit)) in SphereTable)
          • Set Sloc[1] = (Position of (Picked unit))
          • Set Sloc[2] = (Sloc[1] offset by 35.00 towards (Facing of (Picked unit)) degrees)
          • Unit - Move (Picked unit) instantly to Sloc[2]
          • Special Effect - Create a special effect at Sloc[2] using Abilities\Weapons\GargoyleMissile\GargoyleMissile.mdl
          • Special Effect - Destroy (Last created special effect)
          • Set SphereGroup = (Units within 150.00 of Sloc[2] matching (((Matching unit) is in SphereDamage) Equal to False))
          • Unit Group - Pick every unit in SphereGroup and do (Actions)
            • Loop - Actions
              • Unit - Cause SphereCaster to damage (Picked unit), dealing (Real(SphereValue[3])) damage of attack type Spells and damage type Normal
              • Unit Group - Add (Picked unit) to SphereDamage
          • Custom script: call DestroyGroup(udg_SphereGroup)
          • Hashtable - Save (SphereValue[6] + 35) as 5 of (Key (Load 6 of (Key (Picked unit)) in SphereTable)) in SphereTable
          • Hashtable - Save Handle OfSphereDamage as 7 of (Key (Picked unit)) in SphereTable
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SphereValue[6] Greater than or equal to SphereValue[1]
            • Then - Actions
              • Set SphereValue[5] = (Load 4 of (Key (Load 6 of (Key (Picked unit)) in SphereTable)) from SphereTable)
              • Set Sloc[3] = (Position of (Load 8 of (Key (Load 6 of (Key (Picked unit)) in SphereTable)) in SphereTable))
              • Set SphereGroup = (Units within 250.00 of Sloc[1] matching (((Matching unit) belongs to an enemy of (Owner of SphereCaster)) Equal to True))
              • Unit Group - Pick every unit in SphereGroup and do (Actions)
                • Loop - Actions
                  • Unit - Cause SphereCaster to damage (Picked unit), dealing (Real(SphereValue[2])) damage of attack type Spells and damage type Normal
              • Custom script: call DestroyGroup(udg_SphereGroup)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in MissileGroup2) Equal to 0
                • Then - Actions
                  • Trigger - Turn on Sphere I Move 2 <gen>
                • Else - Actions
              • For each (Integer SphereInt) from 1 to SphereValue[5], do (Actions)
                • Loop - Actions
                  • Unit - Create 1 Sphere Missile 2 for (Owner of SphereCaster) at Sloc[1] facing Default building facing degrees
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (SphereValue[5] mod 2) Equal to 0
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • SphereInt Less than or equal to (SphereValue[5] / 2)
                        • Then - Actions
                          • Set SReal[1] = ((Angle from Sloc[1] to Sloc[3]) + (80.00 - ((160.00 / (Real(SphereValue[5]))) x ((Real(SphereInt)) - 1.00))))
                        • Else - Actions
                          • Set SReal[1] = ((Angle from Sloc[1] to Sloc[3]) + (80.00 - ((160.00 / (Real(SphereValue[5]))) x (Real(SphereInt)))))
                    • Else - Actions
                      • Set SReal[1] = ((Angle from Sloc[1] to Sloc[3]) + (80.00 - ((160.00 / ((Real(SphereValue[5])) - 1.00)) x ((Real(SphereInt)) - 1.00))))
                  • Set SReal[2] = (SReal[1] - (Angle from Sloc[1] to Sloc[3]))
                  • Hashtable - Save SReal[1] as 0 of (Key (Last created unit)) in SphereTable
                  • Hashtable - Save (Distance between Sloc[1] and Sloc[3]) as 1 of (Key (Last created unit)) in SphereTable
                  • Hashtable - Save 0.00 as 2 of (Key (Last created unit)) in SphereTable
                  • Hashtable - Save (SReal[2] / 12.00) as 3 of (Key (Last created unit)) in SphereTable
                  • Hashtable - Save SReal[2] as 4 of (Key (Last created unit)) in SphereTable
                  • Hashtable - Save 65.00 as 6 of (Key (Last created unit)) in SphereTable
                  • Hashtable - Save (Load 3 of (Key (Load 6 of (Key (Picked unit)) in SphereTable)) from SphereTable) as 7 of (Key (Last created unit)) in SphereTable
                  • Hashtable - Save Handle OfSphereCaster as 5 of (Key (Last created unit)) in SphereTable
                  • Unit Group - Add (Last created unit) to MissileGroup2
              • Custom script: call RemoveLocation(udg_Sloc[3])
              • Set SphereInt = 0
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in MissileGroup2) Equal to (Load 4 of (Key (Load 6 of (Key (Picked unit)) in SphereTable)) from SphereTable)
                • Then - Actions
                  • Trigger - Turn on Sphere I Move 2 <gen>
                • Else - Actions
              • Hashtable - Clear all child hashtables of child (Key (Load 6 of (Key (Picked unit)) in SphereTable)) in SphereTable
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in SphereTable
              • Special Effect - Create a special effect at Sloc[1] using Abilities\Spells\Undead\Unsummon\UnsummonTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit Group - Remove (Picked unit) from MissileGroup1
              • Unit - Remove (Picked unit) from the game
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in MissileGroup1) Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
          • Custom script: call RemoveLocation(udg_Sloc[1])
          • Custom script: call RemoveLocation(udg_Sloc[2])

  • Sphere | Move 2
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in MissileGroup2 and do (Actions)
        • Loop - Actions
          • Set SReal[1] = (Load 0 of (Key (Picked unit)) from SphereTable)
          • Set SReal[2] = (Load 1 of (Key (Picked unit)) from SphereTable)
          • Set SReal[3] = (Load 2 of (Key (Picked unit)) from SphereTable)
          • Set SReal[4] = (Load 3 of (Key (Picked unit)) from SphereTable)
          • Set SReal[5] = (Load 4 of (Key (Picked unit)) from SphereTable)
          • Set SReal[6] = (Load 6 of (Key (Picked unit)) from SphereTable)
          • Set Sloc[1] = (Position of (Picked unit))
          • Set Sloc[2] = (Sloc[1] offset by (12.00 / (Cos(SReal[5]))) towards SReal[1] degrees)
          • Animation - Change (Picked unit) flying height to ((Current flying height of (Picked unit)) + ((Tan(SReal[6])) x 12.00)) at 0.00
          • Unit - Move (Picked unit) instantly to Sloc[2]
          • Custom script: call RemoveLocation(udg_Sloc[1])
          • Set SReal[1] = (SReal[1] - SReal[4])
          • Set SReal[3] = (SReal[3] + 12.00)
          • Set SReal[5] = (SReal[5] - SReal[4])
          • Set SReal[6] = (SReal[6] - 6.00)
          • Hashtable - Save SReal[1] as 0 of (Key (Picked unit)) in SphereTable
          • Hashtable - Save SReal[3] as 2 of (Key (Picked unit)) in SphereTable
          • Hashtable - Save SReal[5] as 4 of (Key (Picked unit)) in SphereTable
          • Hashtable - Save SReal[6] as 6 of (Key (Picked unit)) in SphereTable
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SReal[3] Greater than or equal to 300.00
            • Then - Actions
              • Set SphereCaster = (Load 5 of (Key (Picked unit)) in SphereTable)
              • Set SReal[7] = (Real((Load 7 of (Key (Picked unit)) from SphereTable)))
              • Set Sloc[1] = (Position of (Picked unit))
              • Set SphereGroup = (Units within 100.00 of Sloc[1] matching (((Matching unit) belongs to an enemy of (Owner of SphereCaster)) Equal to True))
              • Unit Group - Pick every unit in SphereGroup and do (Actions)
                • Loop - Actions
                  • Unit - Cause SphereCaster to damage (Picked unit), dealing SReal[7] damage of attack type Spells and damage type Normal
              • Custom script: call DestroyGroup(udg_SphereGroup)
              • Custom script: call RemoveLocation(udg_Sloc[1])
              • Unit Group - Remove (Picked unit) from MissileGroup2
              • Unit - Remove (Picked unit) from the game
              • Special Effect - Create a special effect at Sloc[2] using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
              • Special Effect - Destroy (Last created special effect)
              • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in SphereTable
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in MissileGroup2) Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
          • Custom script: call RemoveLocation(udg_Sloc[2])

Changelog:



V1.00:
  • First upload

V1.10:
  • Added a "terrain" (yes, I'm a crappy terrainer).
  • Removed a useless action (testing-purposes)
  • Fixed the small missiles' accuracy
  • Added standard units, to see how strong the spell is in a standard game
  • Added comments to the triggers, so they're easier to read and understand.

V1.12:
  • Fixed a typo
  • Changed the first missile's flying height a bit
  • Changed the hive's description a bit

V1.2:
  • Made the spell MCI (couldn't take it anymore)
  • Changed the preview screen

Keywords:
unholy, dark, demon, chaos, blast, wave, sphere
Contents

Chaotic Sphere (Map)

Reviews
17:32, 30th Nov 2009 TriggerHappy: Coding is good. Effect is decent. Approved.

Moderator

M

Moderator

17:32, 30th Nov 2009
TriggerHappy:

Coding is good. Effect is decent. Approved.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
My first spell (submission), great... >.>

Any comments are appreciated (negative help me improve the spell, positive help me boost my ego... win-win situation).

If I need to add another guide, or add comments in the triggers (to make it more readable), or anything else you can think of, please say so.
I hope I didn't look over anything important :)

Edit:
YES, it's GUI and YES, it's with hashtables, it's not as good as JASS, but you need to learn to live with the fact that most people use GUI... (and that I don't like using JASS for some stupid reasons).
 
Level 16
Joined
Jul 4, 2008
Messages
1,106
Reviewing O_O

Review

Current Job: Nothing!...

Triggering:
- Leaks: No
- Eye-Candy: Nice!
- Documentation: Where is it...?
- User Friendly: Hashtables.... BLARGH! Not.. (Maybe for some people..)
- Usability: Lots! Could go anywhere.

In-Game:
- Eye-Candy: What would look better than green and black O_O
- Testmap: Well... It is, but the terrain is dull.
- User Friendly: Very... VERY! User Friendly.


{5/5}
 
Last edited:
Review:
Idea

nice idea and i haven't seen something totally similar here
5/5
Coding

well cause i use mainly vJass i can't see every small mistake in GUI, but your coding seems to be leakless and efficient.
but your calculation of the missile movement seems to need improvement cause they hit the ground a little in front of the unit and not at the units feet...
4/5
Documentation

One word: Perfect
5/5
Result

A very good spell with nice eyecandy, perfect documentation and a nice short code.
Just one suggestion: replace the 10000HP footman with the normal version so testers can see the force of this spell at once :thumbs_up:

Overall: (5+4+5)/3 = 4.6 ==> 5
Vote for Approval: Yes
+rep: Yes
PM me when you want me to look over your ressource again
 
Level 9
Joined
Aug 2, 2008
Messages
219
Edit:
YES, it's GUI and YES, it's with hashtables, it's not as good as JASS, but you need to learn to live with the fact that most people use GUI... (and that I don't like using JASS for some stupid reasons).

I don´t see whats so bad about GUI, if you can use it right it´s perfectly fine. Anyway i checked the spell and it is very good for your fist spell submission. Coding seems fine for me, i couldn´t spot any leaks so far and it is MUI. I like the idea that you stored that data from the hashtable in globals, this improves efficiency, because using variables is much faster then call functions. You should really add some comments to your code (some seperating lines so that the code is easier to read). The spell concept is decent and the visuals are nice too. The documentation is in one word awesome. You should fix the missile inaccuracy the wither mentioned, furthermore the small missiles which spawn after the explosion will move to the position of the target unit when the spell was casted, so if the target unit goes away the small missiles head to the wrong place.

~TNT
 
Level 19
Joined
Feb 4, 2009
Messages
1,313
Agree with the post above (the missiles flying back are inaccurate)

the spell hits magic immune units, structures, flying units, etc. (you can not select such a target directly but the shockwave dmg does hit them)

I prefer
JASS:
set bj_wantDestroyGroup = true
over
JASS:
call DestroyGroup( udg_Group )
cause it is faster, requires less variables and cooler :thumbs_up:
(source: http://www.thehelper.net/forums/showthread.php?t=123207 )

I didn't get the use of this:
  • Set SphereInt = 0
and deleting this line didn't cause any errors so I think it's useless

some text explaining how the triggers work would be nice, too (although I think it's a waste of time 'cause everybody who'd bother to read them is able to understand the spell anyway)

nice work
make more :grin:
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Okay, I've mixed up a lot of quotes in this post...
It's a bit chaotic, but I hope everyone can find his post in this ><

OffGraphic said:
- Leaks: Yes (Where do you clear MissileGroup1 & MissileGroup2? I cannot find the clear for the leak, I'll make it for now as yes. Just tell me where you clear it, or am I wrong and it is not even needed to be cleared?)
They do not need to be cleared, as they're static groups (together with "SphereDamage", which is also a unit group :p)
So I never create an additional group - if I do use additional groups, I have used the "SphereGroup" variable).

OffGraphic said:
- Documentation: Where is it...?
Inside the trigger editor? o_O
Okay, I didn't say how the spell works, perhaps I'll add that in as well ^^
(as well as comments in the triggers, wihch has also been said by

but your calculation of the missile movement seems to need improvement cause they hit the ground a little in front of the unit and not at the units feet...
Really? D: awkward... I thought it was all perfectly calculated xD
I'll look into this (my first thought is a loc[1] / loc[2] mixup, which can easily be fixed).

Just one suggestion: replace the 10000HP footman with the normal version so testers can see the force of this spell at once
Ohh, yeah... I thought I'd place a 10k HP footman, so the users can see exactly how much damage it does (easy calculating), but I've made a command (and quest) for that.
Stupid me :p

the gandlaf-dude said:
I prefer
set bj_wantDestroyGroup = true
over
call DestroyGroup( udg_Group )
cause it is faster, requires less variables and cooler
Yeah, but the MissileGroup1, MissileGroup2 and SphereDamage (all unit groups) may not be removed :p

Graphicman said:
- Testmap: Well... It is, but the terrain is dull.
I know :(
Before uploading I thought "I should actually create a better terrain".
Then I laughed and thought "Ya, right" and hit the upload-button.
I'll do my best to add it, though ^^
(be happy it isn't the standard, ugly, lordaeron summer o_O)

D4RK G4ND4LF said:
I didn't get the use of this:
Set SphereInt = 0
and deleting this line didn't cause any errors so I think it's useless
Oi, that was a function I had to use when testing the map :O (I added a few things and I needed that to clear my stupid tests :p)
~Removed

OffGraphic said:
- User Friendly: Hashtables.... BLARGH! Not.. (Maybe for some people...
I don't know, I find it very easy to use/change them, but perhaps that is because I like working with them?

D4RK G4ND4LF said:
the spell hits magic immune units, structures, flying units, etc. (you can not select such a target directly but the shockwave dmg does hit them)
I don't see a problem with structures, but I will make flying/immune units exceptions (didn't even think about that).

so if the target unit goes away the small missiles head to the wrong place.
When that happens, the target unit won't receive any damage (from the small missiles), I don't see the problem in that case :p
Creating homing missiles wasn't exactly my point (they won't make the spheric shape in that case :sad: )


Update will follow in several minutes (if I'm not too lazy).
  • Magic Immune / Flying Units will be excluded
  • I hope to fix the small missiles' accuracy
  • More information about the triggering itself
  • Adding standard warcraft-units, so you can see how strong the spell actually is.
  • A terrain... perhaps?

Actually, the basic idea was to create an arcane spell, but when I checked a few special effects (that's why the useless line still exists in my code, so I could change the effect in-game -.-), I saw this effect and thought "wow, cool", so I just changed the entire concept... :p


Thanks to everyone for posting!
 
Level 14
Joined
Nov 23, 2008
Messages
512
  • Hashtable - Save SphereValue[1] as 0 of (Key (Triggering unit)) in SphereTable
  • Hashtable - Save SphereValue[2] as 1 of (Key (Triggering unit)) in SphereTable
  • Hashtable - Save SphereValue[3] as 2 of (Key (Triggering unit)) in SphereTable
  • Hashtable - Save SphereValue[4] as 3 of (Key (Triggering unit)) in SphereTable
  • Hashtable - Save SphereValue[5] as 4 of (Key (Triggering unit)) in SphereTable
does this not destroy the MUInes?
because if you cast it again the variables will be overwritten.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
  • Hashtable - Save SphereValue[1] as 0 of (Key (Triggering unit)) in SphereTable
  • Hashtable - Save SphereValue[2] as 1 of (Key (Triggering unit)) in SphereTable
  • Hashtable - Save SphereValue[3] as 2 of (Key (Triggering unit)) in SphereTable
  • Hashtable - Save SphereValue[4] as 3 of (Key (Triggering unit)) in SphereTable
  • Hashtable - Save SphereValue[5] as 4 of (Key (Triggering unit)) in SphereTable
does this not destroy the MUInes?
because if you cast it again the variables will be overwritten.

Nope, that's exactly the main advantage of hashtables ^^
I save the variable ONLY for the picked unit (which is the casting unit in your example).
When another unit casts the spell, the variables will be saved for that unit, the other ones will not be overwritten.
(well, it doesn't exactly work like that, but it's easy to explain it like this :p).
 
I know :(
Before uploading I thought "I should actually create a better terrain".
Then I laughed and thought "Ya, right" and hit the upload-button.
I'll do my best to add it, though ^^
(be happy it isn't the standard, ugly, lordaeron summer o_O)

If you suck that much in terraining, you can always use a terrain template ;)
Then you can import the spell to the terrain map and its done. Ofc give credits, but anyways :p
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
but the triggering unit is the caster and if the the unit cast it again this variables will overwritten (as i know) because Key(Triggering unit) is the same
But the caster can't cast it while the spell is already being casted... sounds logical (coodlown etc...).
Besides, only the shockwave (part 1 of the spell) is based on that unit, the second part (the small missiles) is based on itself (and it has the casting unit stored in a variable).
Since the shockwave only lasts 1sec - 0.30sec (depends on the cast range), the hero can cast this spell every second, if all goes well every 0.30seconds... not enough for you? xD

Edit:
Here, the caster is casting it twice (believe me, I couldn't cast if faster after eachother xD)
It didn't bug at all.

screenyyz.jpg

 
Level 25
Joined
Jun 5, 2008
Messages
2,572
I am interested in the arcs you used, what is the formula you used or the way you implemented it?
EDIT:
If you can, merge the 2 triggers(periodic ones).
EDIT2:
Not MUI:
-changed the speed of the misile to 5 to see if it can be bugged.
-spammed the spell
-result, the attached pics
NOTE:
I wasn't fast enough to snapshot 2 pics of first 4 casts, so i did that in the 2nd time i tested.

EDIT3:
@baasee reply
Indexing ftw, you will never reach such a high amount of instances, and some indexing is of high quality.
EDIT4:
If you can't spam it mindlessly it ain't MUI by my book :p
 

Attachments

  • bug01.JPG
    bug01.JPG
    35.5 KB · Views: 206
  • bug02.JPG
    bug02.JPG
    45.9 KB · Views: 181
Level 22
Joined
Nov 14, 2008
Messages
3,256
but the triggering unit is the caster and if the the unit cast it again this variables will overwritten (as i know) because Key(Triggering unit) is the same

it doesnt bug because it saves each different info for each unit it saves into the hashtable if it is the same, it just creates another instance isntead of overwriting with limitless of instances (ofc they are ALOT slower than indexing but got the great advantage of limitless instances)
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
I am interested in the arcs you used, what is the formula you used or the way you implemented it?

XY-arc:


For the XY-arc I've used the "basic angle" (the normal angle would depend on the position of the caster compared to the position of the targetted unit), but since I've used the cosinus, it would bug (I have to divide 12 with the cosinus, cos(90º) = 0, so in that case I had to divide something with zero).


First I will show an image which might clear up a few things ^^
triangle02.gif

A triangle... a right-angled triangle, this is the basis.

On the drawing:
A = Angle that the missile has to make every loop
c = Offset the missile needs to be moved every loop
b = Offset the missile moves towards the caster (= 12.00, this never changes... I want it to move smoothly towards the target)

The arc formula is:
Set Sloc[2] = (Sloc[1] offset by (12.00 / (Cos(SReal[5]))) towards SReal[1] degrees)​
That doesn't say much I guess?

I'll try to explain this :p

The initial angle of the missile is defined by another formula (actually 3, since it's different for positive/negative angles and 0º), but I won't show that... all you need to know is that it's a pre-defined angle.
Then I have divided that angle by 12.00 (the same as b), this new number will become the amount of degrees the original angle will change every loop.

In the arc-formula, I move the missile
(if you don't know why, it comes from the formula "Cos(A) = b/c"
Since I already know b (which is 12.00) and A (which changes every loop, but I decide the amount it changes, so I also know A).
the formula becomes: "c = b/Cos(A)"

OR: c = 12.00/Cos(A)
Let's say A = 60º
c = 12/Cos(60º) = 12/0.5 => c = 24

Which means I need to move the missile with an offset of 24 towards 60º.
This value will get smaller and smaller, until it reaches c = 12 and will then increase again (the angle will become negative).


Z-arc:

(height)

This is a lot easier, since all missiles have the same Z-angle (65º I believe)

We'll need the drawing again...
This time, I want to calculate 'a' (which is the height, obviously).
Since the formula is "tan(A) = a/b"

We know A, it's a pre-defined angle (and it decreases by 6º every loop).
We also know b
We need to know a, so this becomes: "a = tan(A) x b".

if A = 30º: a = tan(30º) x 12.00 => a = 6.93

The value will decrease as the angle becomes negative, thus the missile descends.



ehhh, I'm not the best teacher... this is really simple once you know how to do it, though ><

Kingzz said:
Lol, MUI means "Multi-Unit Instanceable", or: multiple units can use this spell at the same time, so every unit on the map can cast it once at the same moment.
You are creating something new, probably something like "MCI" (Multi-Cast Instanceable): it doesn't matter who casts it and when, it will always work - this cannot be done with hashtables (or perhaps it can, but a long way around).

And I think I have proven that it is half-MCI and completely MUI (the small missiles will not bug with the shockwave while existing at the same time, casted by the same unit, but when there are multiple shockwaves, it will bug indeed).]
Funny, since it's absolutely pointless to have multiple shockwaves runnig at the same time.

King said:
If you can't spam it mindlessly it ain't MUI by my book :p
Lol xD
it is MUI, though... :)

Yeah, indexing ftw, but I like hashtables because they're really easy to use and I'm just way too lazy xD

King said:
If you can, merge the 2 triggers(periodic ones).
Perhaps I can, but then the overall stress increases according to me.
The shockwave-trigger will turn off when it's done and then the small missiles turn on.
If you pour it all into 1 trigger, it loops the entire, huge thing until the entire spell is done.
 
Level 25
Joined
Jun 5, 2008
Messages
2,572
Damn i hate trigonometry :p

Anyway, gj on getting this aproved.

@apocalypse

Well what if a guy wants to use this in a map that has an item/ability that resets cooldowns? Then it would bug, yes?

Anyway you make a fine point, i won't debate any further, nice spell, nice effects, though the missiles return trajectory is a bit strange.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Kingz said:
Well what if a guy wants to use this in a map that has an item/ability that resets cooldowns? Then it would bug, yes?
Well, yeah... if they decrease the speed of the shockwave, or if they change the casting cooldown (how do I say this? Err... the there's a time delay between casting the spell and being able to cast it again, it's not really casting time, but it's just the animation), it will bug.

With the current settings (which look the best in my opinion), you would have to be a pro at buttonmashing to make it bug, but it would still be possible (small chance, though).
But I don't think anyone (if someone would use the spell in the first place) change the speed this drastically that it could easily be bugged ^^

You're still correct, though... it can be bugged (on the conditions mentioned above).

Thanks for your comments :p
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Hash is an easy way to make something MUI, like it or not... perhaps most people just don't accept that and stick to the older indexing because they don't like change?
Whatever the reason, I haven't experienced any problems with hashtables so far, I can easily use multiple hashtable systems running at the same moment without any lag/delay/bugs and the systems that I create with it are always completely MUI.
It's also not very hard to make some MCI, as I just noticed (As I name it... Multi-Cast Instanceable).

And it IS fully MUI...

chaosmui.jpg

If that isn't MUI, then neither are the standard blizzard spells :/
 
Level 9
Joined
Aug 2, 2008
Messages
219
Of course your spell supports more than one casts at the same time, but it only works properly if there is only one instance running on one caster. Well try this: Set the interval in your Move 1 and 2 triggers to a rather high high value, some thing like one second. Now launch the spell with the same caster on the same target unit twice. Of course the will be 2 of there main missiles, the first one will work properly, but after the second one explodes it won´t create the small green missiles.
I don´t really know what´s causing this effect but i guess it has something to do with the unit groups. A group won´t contain the same unit twice, so when the first instance expires then the caster or whatever you used in that group is removed from it, so the second instance which also uses the unit from the first instance lost it´s reference what could result in a malfunction. However this is only a surmise of mine and there is no guarantee that i´m right.

~TNT
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Thanathos said:
Of course your spell supports more than one casts at the same time, but it only works properly if there is only one instance running on one caster. Well try this: Set the interval in your Move 1 and 2 triggers to a rather high high value, some thing like one second. Now launch the spell with the same caster on the same target unit twice. Of course the will be 2 of there main missiles, the first one will work properly, but after the second one explodes it won´t create the small green missiles.
I know this, Kingz already mentioned it and I think my answer is good enough:
With the current values, it's highly unlikely that the spell will bug - even when you spam it, because the large missile and the small missiles move independantly (and thus you can have small and large missiles of the same caster which both perfectly work).
When you fiddle with the numbers (e.g.: make the movement speed slower, or increase the interval), the spell will just look like crap, so I don't see the point in that as well.
On top of that: most maps have something called "cooldown" (okay, there are modes without cooldown, but then the above statement would still be in effect).

Thanathos said:
I don´t really know what´s causing this effect but i guess it has something to do with the unit groups. A group won´t contain the same unit twice, so when the first instance expires then the caster or whatever you used in that group is removed from it, so the second instance which also uses the unit from the first instance lost it´s reference what could result in a malfunction. However this is only a surmise of mine and there is no guarantee that i´m right.
Well, I just overwrite all values when the spell is cast twice (I save all values for the casting unit, when the spell is cast twice, the first values will be overwritten by the second one, causing it to explode whenever the first one exploed), that's the cause of the malfunction :/
I can do it differently: I can create the shockwave and save all values for the shockwave instead of the caster and that would fix it, but I just don't see the point in doing this.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
So ap0calpyse... you don't know how to use vJass, and if I submitted my maps in 100% pure concentrated vJass, you wouldn't be able to criticize my triggers? :p
Indeed, I don't know vJass :p
But knowing vJass is very efficient, I'll just believe your triggers are good xD (and if they aren't, my basic JASS knowledge will see that I think).

Not the best ive seen but guess it works :)
Can you explain? Perhaps i can adjust a few things ;)
 
Level 14
Joined
Jan 5, 2009
Messages
1,127
I shall test this.
Mah review
Review

[+] MUI: Allows more then one unit to cast it.
[+] Effects: It looks cool, the missles do an excellent arc.
[+] Configuration: You added a guide to configure your spell's value
[+] Leaks: Removed all leaks Good Job. (I hate lag)
[+] Name suits it: It is definitly Chaotic, or unholy.
Overall Opinion: The effects are wonderful and are not spamming like a million and one lightning bolts at the same time, Configuration is easy as you added a guide into the demo map. Leaks are pesky and can cause lag, thats why you clean them, and you have cleaned your leaks. MUI is important, otherwise the spell will end up bugging and something bad will happen.
5/5 -> +REP
Great Job! :thumbs_up:
 
Last edited:
Level 11
Joined
Apr 29, 2007
Messages
826
Having several periodic triggers is less efficent that 1 as far as i know.

I don't know who told you that, but it is definately not true. Although it depends on the size of those triggers, it's more likely that different triggers execute faster when they're seperated from eachother.That does make sense because all those BJ's you're using are slow as hell.
 
Level 3
Joined
Nov 8, 2009
Messages
46
Help!!!

Hey, i think i edit it wrong way but i dont know how to edit it in the correct way.. when i try my skill the wave come out and my food keep going up very fast and theres no effect buy only dmg...
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Hey, i think i edit it wrong way but i dont know how to edit it in the correct way.. when i try my skill the wave come out and my food keep going up very fast and theres no effect buy only dmg...
Okay, I am guessing you didn't read the manual thoroughly.
The reason why there are no effects and the food count goes up is because you didn't use the correct units.
Once you have copied all units and triggers, you need to edit these things:

Go to the trigger "Sphere I Spell Init" and change the condition to "(Ability being cast) Equal to Chaotic Sphere" (if this wasn't already correct).
Still is in the same trigger, there is a unit - create unit-action, set the unit to "Sphere Missile 1". (again: if this wasn't already correct)

Halfway through the trigger "Sphere I Move 1", there is also a create unit-action.
This time, set the unit to "Sphere Missile 2".


So the reason why it didn't work correctly, is because it picked another unit.
This unit will be spawned, this the food cost goes higher and the effects are based off the unit's model, so since the unit has another model, the effects won't show.

-------------------------------------------------

Can someone tell me how to import Spells? Btw ver good job 5/5!
Thank you ^^
Well, if you open the map ( = spell) in the world editor and go to the trigger editor (F4), you can see a green category with a few green triggers.
Those are comments, everything you need to know should be in there.
This is what's included:
  • General Information - (explains the spell)
  • How To Import? (1) - (how to import all data correctly)
  • How To Import? (2) - (how to set up all data correctly)
  • Possible Problems - (if you encounter a problem after imporing, consult this)
  • Change Values - (How to change the damage, range, amount of missiles, ...).
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Multi-Cast Instanceable (information is given in the description). Also called "SUMI".
It's what most people call "[abbr="Multiple Units Instanceable]MUI[/abbr]", which seems incorrect to me because it only says that different units have to be able to cast it once at the same time (not multiple times).
 
Top