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.

Kinetic Ring v1.3

Submitted by Almia
This bundle is marked as approved. It works and satisfies the submission rules.

Kinetic Ring


Tooltip
Covers the caster in the ring of magnetic energies that pulls enemy units inside.If a unit inside the ring tries to escape,the unit will be pulled inside,dealing damage per second and keeping him inside the ring.If the unit is too close to the caster,the unit's mana will be burned per second.Lasts for a few seconds or until the caster is dead.
Level 1 - Deals 30 damage,burns 15 mana and lasts for 5 seconds.
Level 2 - Deals 40 damage,burns 30 mana and lasts for 7.5 seconds.
Level 3 - Deals 50 damage,burns 45 mana and lasts for 10 seconds.
Triggers
Triggers
[trigger=Initialization]KR Config
Events
Map initialization
Conditions
Actions
Custom script: set udg_KR_Hash = InitHashtable()
-------- ------------------------------------------------- --------
-------- CONFIGURATION --------
-------- ------------------------------------------------- --------
-------- ------------------------------------------------- --------
-------- Determines the number of orbs --------
-------- ------------------------------------------------- --------
Set KR_OrbsNumber = 8
-------- ------------------------------------------------- --------
-------- Determines the distances per orb --------
-------- ------------------------------------------------- --------
Set KR_OrbDegrees = 45.00
-------- ------------------------------------------------- --------
-------- Determines the distance of the orbs from the caster when summoned --------
-------- ------------------------------------------------- --------
Set KR_OrbDistance = 100.00
-------- ------------------------------------------------- --------
-------- Determines the damage --------
-------- ------------------------------------------------- --------
Set KR_Damage[1] = 30.00
Set KR_Damage[2] = 40.00
Set KR_Damage[3] = 50.00
-------- ------------------------------------------------- --------
-------- Determines the mana burn --------
-------- ------------------------------------------------- --------
Set KR_ManaBurn[1] = 15.00
Set KR_ManaBurn[2] = 30.00
Set KR_ManaBurn[3] = 45.00
-------- ------------------------------------------------- --------
-------- Determines the detection radius for the unit to be pulled --------
-------- ------------------------------------------------- --------
Set KR_DetectRadius = 100.00
-------- ------------------------------------------------- --------
-------- Determines the max range of the unit can travel --------
-------- ------------------------------------------------- --------
Set KR_MaxDistance = 500.00
-------- ------------------------------------------------- --------
-------- Determines the distance for mana burn --------
-------- ------------------------------------------------- --------
Set KR_MinDistance = 150.00
-------- ------------------------------------------------- --------
-------- Determines the speed of the orb in outwarding --------
-------- ------------------------------------------------- --------
Set KR_OrbBaseSpeed = 250.00
Set KR_OrbSpeed = (KR_OrbBaseSpeed x 0.04)
-------- ------------------------------------------------- --------
-------- Determines the speed of the orb in spinning --------
-------- ------------------------------------------------- --------
Set KR_SpinSpeed = (180.00 x 0.02)
-------- ------------------------------------------------- --------
-------- Determines the time for the orb to stop outwarding --------
-------- ------------------------------------------------- --------
Set KR_MaxOrbTime = 2.00
-------- ------------------------------------------------- --------
-------- Determines the Duration of the Kinetic Ring --------
-------- ------------------------------------------------- --------
Set KR_Duration[1] = 5.00
Set KR_Duration[2] = 7.50
Set KR_Duration[3] = 10.00
-------- ------------------------------------------------- --------
-------- Determines the lightning model for the Kinetic Ring --------
-------- ------------------------------------------------- --------
Set KR_LModel = CLPB
-------- ------------------------------------------------- --------
-------- Determines the coloration of the lightning --------
-------- ------------------------------------------------- --------
Set KR_Red = 0.00
Set KR_Green = 1.00
Set KR_Blue = 1.00
-------- ------------------------------------------------- --------
-------- Determines the bonus height of lightnings --------
-------- ------------------------------------------------- --------
Set KR_LightningHeight = 75.00
-------- ------------------------------------------------- --------
-------- Determines the SFX created when the orbs are spinning --------
-------- ------------------------------------------------- --------
Set KR_OrbSFX = Abilities\Spells\Human\Feedback\ArcaneTowerAttack.mdl
-------- ------------------------------------------------- --------
-------- END OF CONFIGURATION --------
-------- ------------------------------------------------- --------
[/trigger][trigger=Cast]KR Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Kinetic Ring
Actions
-------- ------------------------------------------------- --------
-------- Variables --------
-------- ------------------------------------------------- --------
Set KR_Caster = (Triggering unit)
Custom script: set udg_KR_CasterKey = GetHandleId(udg_KR_Caster)
Set KR_CasterLoc = (Position of KR_Caster)
Set KR_Levels = (Level of Kinetic Ring for KR_Caster)
Set KR_Owner = (Triggering player)
-------- ------------------------------------------------- --------
-------- Creating Orbs --------
-------- ------------------------------------------------- --------
For each (Integer KR_TotalOrbs) from 1 to KR_OrbsNumber, do (Actions)
Loop - Actions
-------- ------------------------------------------------- --------
-------- Removing Orbs --------
-------- ------------------------------------------------- --------
Set KR_LastOrbs[KR_TotalOrbs] = (Load KR_TotalOrbs of KR_CasterKey in KR_Hash)
Unit - Kill KR_LastOrbs[KR_TotalOrbs]
-------- ------------------------------------------------- --------
-------- Creating Orb --------
-------- ------------------------------------------------- --------
Set KR_CasterOffset = (KR_CasterLoc offset by KR_OrbDistance towards ((Real(KR_TotalOrbs)) x KR_OrbDegrees) degrees)
Unit - Create 1 KR Dummy for KR_Owner at KR_CasterOffset facing Default building facing degrees
Set KR_LastOrbs[KR_TotalOrbs] = (Last created unit)
-------- ------------------------------------------------- --------
-------- Adding Duration --------
-------- ------------------------------------------------- --------
Unit - Add a KR_Duration[KR_Levels] second Generic expiration timer to KR_LastOrbs[KR_TotalOrbs]
-------- ------------------------------------------------- --------
-------- Saving Orb --------
-------- ------------------------------------------------- --------
Hashtable - Save Handle OfKR_LastOrbs[KR_TotalOrbs] as KR_TotalOrbs of KR_CasterKey in KR_Hash
-------- ------------------------------------------------- --------
-------- Clean Leak --------
-------- ------------------------------------------------- --------
Custom script: call RemoveLocation(udg_KR_CasterOffset)
-------- ------------------------------------------------- --------
-------- Saving variables for the loop --------
-------- ------------------------------------------------- --------
Set KR_CurrentDuration = 0.00
Set KR_CurrentDistance = 100.00
Hashtable - Save KR_CurrentDuration as (Key duration) of KR_CasterKey in KR_Hash
Hashtable - Save KR_Levels as (Key level) of KR_CasterKey in KR_Hash
Hashtable - Save KR_CurrentDistance as (Key distance]) of KR_CasterKey in KR_Hash
-------- ------------------------------------------------- --------
-------- Starting Loop --------
-------- ------------------------------------------------- --------
Unit Group - Add KR_Caster to KR_LoopGroup
Trigger - Turn on KR Loop <gen>
-------- ------------------------------------------------- --------
-------- Clean Leak --------
-------- ------------------------------------------------- --------
Custom script: call RemoveLocation(udg_KR_CasterLoc)
[/trigger][trigger=Loop]KR Loop
Events
Time - Every 0.04 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in KR_LoopGroup and do (Actions)
Loop - Actions
Set KR_U = (Picked unit)
Custom script: set udg_KR_UKey = GetHandleId(udg_KR_U)
-------- ------------------------------------------------- --------
-------- Load --------
-------- ------------------------------------------------- --------
Set KR_CurrentDuration = (Load (Key duration) of KR_UKey from KR_Hash)
Set KR_Levels = (Load (Key level) of KR_UKey from KR_Hash)
For each (Integer KR_TotalOrbs) from 1 to KR_OrbsNumber, do (Actions)
Loop - Actions
Set KR_LastOrbs[KR_TotalOrbs] = (Load KR_TotalOrbs of KR_UKey in KR_Hash)
Set KR_CurrentDegrees = (Load (Key degrees) of KR_UKey from KR_Hash)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
KR_CurrentDuration Less than KR_MaxOrbTime
Then - Actions
Set KR_CurrentDistance = (Load (Key distance) of KR_UKey from KR_Hash)
Else - Actions
Set KR_CurrentDistance = KR_MaxDistance
-------- ------------------------------------------------- --------
-------- Checking --------
-------- ------------------------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
KR_CurrentDuration Less than KR_Duration[KR_Levels]
Then - Actions
-------- ------------------------------------------------- --------
-------- Checking if the caster is alive --------
-------- ------------------------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(KR_U is alive) Equal to True
Then - Actions
-------- ------------------------------------------------- --------
-------- Starting Loop --------
-------- ------------------------------------------------- --------
Set KR_ULoc = (Position of KR_U)
-------- ------------------------------------------------- --------
-------- Moving Orbs --------
-------- ------------------------------------------------- --------
For each (Integer KR_TotalOrbs) from 1 to KR_OrbsNumber, do (Actions)
Loop - Actions
Set KR_OrbOffset = (KR_ULoc offset by KR_CurrentDistance towards (((Real(KR_TotalOrbs)) x KR_OrbDegrees) + KR_CurrentDegrees) degrees)
-------- ------------------------------------------------- --------
-------- Moving Orb --------
-------- ------------------------------------------------- --------
Unit - Move KR_LastOrbs[KR_TotalOrbs] instantly to KR_OrbOffset
Special Effect - Create a special effect at KR_OrbOffset using KR_OrbSFX
Special Effect - Destroy (Last created special effect)
-------- ------------------------------------------------- --------
-------- Clean Leak --------
-------- ------------------------------------------------- --------
Custom script: call RemoveLocation(udg_KR_OrbOffset)
-------- ------------------------------------------------- --------
-------- Destroying Lightnings --------
-------- ------------------------------------------------- --------
For each (Integer KR_Counts) from 10 to (Load (Key count) of KR_UKey from KR_Hash), do (Actions)
Loop - Actions
Lightning - Destroy (Load KR_Counts of KR_UKey in KR_Hash)
Set KR_Counts = 9
-------- ------------------------------------------------- --------
-------- Picking Units --------
-------- ------------------------------------------------- --------
Set KR_TempGroup = (Units within (KR_CurrentDistance + KR_DetectRadius) of KR_ULoc)
Unit Group - Pick every unit in KR_TempGroup and do (Actions)
Loop - Actions
Set KR_Picked = (Picked unit)
-------- ------------------------------------------------- --------
-------- Checking --------
-------- ------------------------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(KR_Picked is A structure) Not equal to True
(KR_Picked is Magic Immune) Not equal to True
(KR_Picked is alive) Equal to True
(KR_Picked belongs to an enemy of (Owner of KR_U)) Equal to True
Then - Actions
Set KR_PickedLoc = (Position of KR_Picked)
Set KR_Distance = (Distance between KR_CasterLoc and KR_PickedLoc)
-------- ------------------------------------------------- --------
-------- Starts Counting Units --------
-------- ------------------------------------------------- --------
Set KR_Counts = (KR_Counts + 1)
-------- ------------------------------------------------- --------
-------- Variables for the Lightning --------
-------- ------------------------------------------------- --------
-------- ------------------------------------------------- --------
-------- For the Caster --------
-------- ------------------------------------------------- --------
Custom script: set udg_KR_UX = GetUnitX(udg_KR_U)
Custom script: set udg_KR_UY = GetUnitY(udg_KR_U)
Custom script: set udg_KR_UZ = GetUnitFlyHeight(udg_KR_U) + udg_KR_LightningHeight
-------- ------------------------------------------------- --------
-------- For the Picked Unit --------
-------- ------------------------------------------------- --------
Custom script: set udg_KR_PickedX = GetUnitX(udg_KR_Picked)
Custom script: set udg_KR_PickedY = GetUnitY(udg_KR_Picked)
Custom script: set udg_KR_PickedZ = GetUnitFlyHeight(udg_KR_Picked) + udg_KR_LightningHeight
-------- ------------------------------------------------- --------
-------- Creating Lightning --------
-------- ------------------------------------------------- --------
Custom script: set udg_KR_Lightning = AddLightningEx(udg_KR_LModel,true,udg_KR_UX,udg_KR_UY,udg_KR_UZ,udg_KR_PickedX,udg_KR_PickedY,udg_KR_PickedZ)
-------- ------------------------------------------------- --------
-------- Changing Color --------
-------- ------------------------------------------------- --------
Lightning - Change color of KR_Lightning to (KR_Red KR_Green KR_Blue) with 1.00 alpha
-------- ------------------------------------------------- --------
-------- Saving Lightning --------
-------- ------------------------------------------------- --------
Hashtable - Save Handle OfKR_Lightning as KR_Counts of KR_UKey in KR_Hash
-------- ------------------------------------------------- --------
-------- Checking --------
-------- ------------------------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
KR_Distance Greater than KR_CurrentDistance
Then - Actions
-------- ------------------------------------------------- --------
-------- Starts Pulling Units --------
-------- ------------------------------------------------- --------
Set KR_PullOffset = (KR_ULoc offset by KR_CurrentDistance towards (Angle from KR_ULoc to KR_PickedLoc) degrees)
Unit - Move KR_Picked instantly to KR_PullOffset
-------- ------------------------------------------------- --------
-------- Damaging Unit --------
-------- ------------------------------------------------- --------
Unit - Cause KR_U to damage KR_Picked, dealing (KR_Damage[KR_Levels] x 0.04) damage of attack type Spells and damage type Magic
-------- ------------------------------------------------- --------
-------- Clean Leak --------
-------- ------------------------------------------------- --------
Custom script: call RemoveLocation(udg_KR_PullOffset)
Else - Actions
-------- ------------------------------------------------- --------
-------- Checking if Distance between picked unit and caster is too close --------
-------- ------------------------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
KR_Distance Less than KR_MinDistance
Then - Actions
-------- ------------------------------------------------- --------
-------- Starts Mana Burn --------
-------- ------------------------------------------------- --------
Set KR_Mana = (Mana of KR_Picked)
Set KR_ManaBurnLoop = (KR_Mana - (KR_ManaBurn[KR_Levels] x 0.04))
Unit - Set mana of KR_Picked to KR_ManaBurnLoop
Else - Actions
-------- ------------------------------------------------- --------
-------- Clean Leak --------
-------- ------------------------------------------------- --------
Custom script: call RemoveLocation(udg_KR_PickedLoc)
Else - Actions
-------- ------------------------------------------------- --------
-------- Saving Variables --------
-------- ------------------------------------------------- --------
Hashtable - Save (KR_CurrentDegrees + KR_SpinSpeed) as (Key degrees) of KR_UKey in KR_Hash
Hashtable - Save (KR_CurrentDuration + 0.04) as (Key duration) of KR_UKey in KR_Hash
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
KR_CurrentDistance Less than KR_MaxDistance
Then - Actions
Hashtable - Save (KR_CurrentDistance + KR_OrbSpeed) as (Key distance) of KR_UKey in KR_Hash
Else - Actions
Hashtable - Save 500.00 as (Key distance) of KR_UKey in KR_Hash
Hashtable - Save KR_Counts as (Key count) of KR_UKey in KR_Hash
-------- ------------------------------------------------- --------
-------- Clean Leaks --------
-------- ------------------------------------------------- --------
Custom script: call RemoveLocation(udg_KR_ULoc)
Custom script: call DestroyGroup(udg_KR_TempGroup)
Else - Actions
-------- ------------------------------------------------- --------
-------- Clean Up --------
-------- ------------------------------------------------- --------
-------- ------------------------------------------------- --------
-------- Destroying Lightnings --------
-------- ------------------------------------------------- --------
For each (Integer KR_Counts) from 10 to (Load (Key count) of KR_UKey from KR_Hash), do (Actions)
Loop - Actions
Lightning - Destroy (Load KR_Counts of KR_UKey in KR_Hash)
Hashtable - Clear all child hashtables of child KR_UKey in KR_Hash
Unit Group - Remove KR_U from KR_LoopGroup
Else - Actions
-------- ------------------------------------------------- --------
-------- Clean Up --------
-------- ------------------------------------------------- --------
-------- ------------------------------------------------- --------
-------- Destroying Lightnings --------
-------- ------------------------------------------------- --------
For each (Integer KR_Counts) from 10 to (Load (Key count) of KR_UKey from KR_Hash), do (Actions)
Loop - Actions
Lightning - Destroy (Load KR_Counts of KR_UKey in KR_Hash)
Hashtable - Clear all child hashtables of child KR_UKey in KR_Hash
Unit Group - Remove KR_U from KR_LoopGroup
-------- ------------------------------------------------- --------
-------- Checking --------
-------- ------------------------------------------------- --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(KR_LoopGroup is empty) Equal to True
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
[/trigger]
Credits
Icon

Icon Idea and Originally made by:

IceFrog Team

Icon Made by:

ScourgeWarchief
Changelogs
Version 1.0
-Released
Version 1.1
-View Reviews of Magtheridon96
Version 1.2
-View Reviews Again
Version 1.3
-Fixed a bug that widens the area if cast twice or more.
-Now removes orbs if there are any orbs used.

Keywords:
orb,magnetic,kinetic,lightning,pull,arcane,energy,mind,telekinesis
Contents

Kinetic Ring v1.3 (Map)

Reviews
Moderator
11:28, 29th Jul 2012 Magtheridon96: 4/5. This is a pretty neat spell. Like I said in the first review, you could use the values of the coordinate variables you're setting directly inside the AddLightningEx call. call...
KILLCIDE
Some global variables are strictly used in JASS scripts, so they will not be created when you import them into another map. For those getting undeclared variable errors or something similar, create the following variables and their type: Variable...
  1. 11:28, 29th Jul 2012
    Magtheridon96: 4/5. This is a pretty neat spell.

    Comments
    • Like I said in the first review, you could use the values of the coordinate variables you're setting directly inside the AddLightningEx call.
      call AddLightningEx(udg_KR_LModel, true, GetUnitX(...), GetUnitY(...), GetUnitFlyHeight(...), GetUnitX(...), GetUnitY(...), GetUnitFlyHeight(...))


    Other than that, good job, there doesn't seem to be any major issues. You still need to fix the above issues though. Only then would it be approved.
     
  2. -Derp-

    -Derp-

    Joined:
    Jun 28, 2011
    Messages:
    157
    Resources:
    3
    Spells:
    2
    Tutorials:
    1
    Resources:
    3
    Pretty good looking spell. I found a funny effect that occurs if you cast the Kinetic Ring twice by the hero. Instead of resetting the spell, the effects double in size.

    bloop
    [​IMG]
    [​IMG]
     
  3. Kingz

    Kingz

    Joined:
    Jun 5, 2008
    Messages:
    2,470
    Resources:
    6
    Spells:
    5
    Tutorials:
    1
    Resources:
    6
    Spells that use hashtables in general aren't properly useable when it comes to the same unit casting the spell multiple times.
    That is what indexing is for.
     
  4. -Derp-

    -Derp-

    Joined:
    Jun 28, 2011
    Messages:
    157
    Resources:
    3
    Spells:
    2
    Tutorials:
    1
    Resources:
    3
    Yep. It's caused from not using a dummy unit substitute and just saving the hero's ID.
     
  5. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,856
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Wow,i didn't notice that one! ill fix it
     
  6. Losam

    Losam

    Joined:
    Mar 27, 2011
    Messages:
    259
    Resources:
    8
    Spells:
    8
    Resources:
    8
    Nice Spell.
     
  7. ap0calypse

    ap0calypse

    Joined:
    Jan 26, 2007
    Messages:
    4,780
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    • Set KR_Distance = (Distance between KR_CasterLoc and KR_PickedLoc)

    The variable "KR_CasterLoc" doesn't exist in the trigger "KR_Loop", so it's just the middle of the map.

    On a related note: that's a shitton of variables.
    The X/Y-variables don't carry over to other maps (because the editor doesn't copy variables that are only used in JASS - or am I mistaken?) and they can just as well be removed entirely.
    I always go by the rule of thumb that you never need more than 3 temporary locations, but you're using 6 of them.

    Edit: there's more! You should take the Location Z into account as well, because I just had the problem that my terrain z was about -700 and the lightning effects were completely off.
    Don't worry, you've got all the locations you need :D. You do need to keep the 2 Z-variables though, otherwise the custom script will be too long.
    This is what I did to fix it:
    • Custom script: set udg_TempReal1 = GetUnitFlyHeight( udg_TempUnit1) + GetLocationZ( udg_TempLoc1)+75.
    • Custom script: set udg_TempReal2 = GetUnitFlyHeight( udg_TempUnit2) + GetLocationZ( udg_TempLoc2)+75.
    • Custom script: set bj_lastCreatedLightning = AddLightningEx( "AFOD", true, GetUnitX(udg_TempUnit1), GetUnitY(udg_TempUnit1), udg_TempReal1, GetUnitX(udg_TempUnit2), GetUnitY(udg_TempUnit2), udg_TempReal2 )

    (You can use "bj_lastCreatedLightning in your spell as well).
    Endedit


    (also, I want people to start using the variable "GlobalHashtable" for all spells/systems and use a "HashtableId" which is an integer like 'KiR' - may upgrade it to 4 digits though
    I do accept that it's just a silly dream and it will probably never happen, but a man can have dreams!)
     
    Last edited: Jan 3, 2013
  8. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,856
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Thanks :D
    but im a lazy coder,i dont update approved spells
     
  9. DESTROYER123

    DESTROYER123

    Joined:
    Jul 12, 2011
    Messages:
    1,198
    Resources:
    0
    Resources:
    0
    I won't judge it by how the triggers are working (because I suck at that) but the spell looks really cool and performs perfect!!!
    Good job!!!
    5/5:goblin_good_job:
     
  10. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,856
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Thanks :D
     
  11. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    6,791
    Resources:
    12
    Models:
    5
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    12
    Please... if you have no clue what you're talking about, then don't be a smartass.

    Hashtables (when used right) work just as well as dynamic indexing.
     
  12. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,856
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    What he meants is that Hashtables generally use GetHandleId when it comes to an MUI spell, apparently (just like UnitIndexer) doesn't support multiple instances of spells on the same unit.

    Dynamic Indexing prevents that from happening.
     
  13. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    6,791
    Resources:
    12
    Models:
    5
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    12
    Nobody uses GetHandleId(unit) for the parent key except in systems that have their own hashtable. Why would you do that? You usually attach your spell to a timer, which can be uniquely created and destroyed (and in 99% of cases you need a timer anyway).
     
  14. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,178
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    It is/was used often that the indexid or handleid of a unit serves as instance key for a spell.
    And as Almia explained it won't allow the unit to have multiple instances at said spell or system.

    Talking offensivly about this several years old post just out of nowhere... for what >.<
     
  15. apcrabnightlive

    apcrabnightlive

    Joined:
    Oct 7, 2014
    Messages:
    1,924
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Dude this is a great idea.
    A very good disabler spell.
     
  16. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,496
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    Some global variables are strictly used in JASS scripts, so they will not be created when you import them into another map. For those getting undeclared variable errors or something similar, create the following variables and their type:
    Variable Name Type
    KR_UX Real
    KR_UY Real
    KR_UZ Real
    KR_PickedX Real
    KR_PickedY Real
    KR_PickedZ Real

    I went ahead and updated the submission so that the error will no longer occur during import. You can either manually create these variables in your map, or re-import the submission with the new update.
     
  17. Keiu

    Keiu

    Joined:
    Nov 28, 2017
    Messages:
    12
    Resources:
    0
    Resources:
    0
    Thanks for responding, I didn't see your reply before I delete my post. I exported the map script and open the script file with notepad, so I can see the JASS scripts and add missing variables, now it works!
     
  18. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,496
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    Cool, but next time, get in the habit of posting the solution instead of just deleting your post. Had I not been here, a lot of people would have been experiencing the same problem, and having your solution here will save a lot of headaches.