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.

Chronosphere v1.1

Submitted by NightSkyAurora
This bundle is marked as approved. It works and satisfies the submission rules.
Help I accidentally made a spell!!!

Chronosphere:
Opens a rip in spacetime, causing everything to be locked in time except the caster. Lasts 4/6/8 seconds.

readme

Chronosphere by NightSkyAurora

No need to give credits to me. I didn't invent this spell, I just made an approved (almost) version for everyone to use.

Credits:
PGRU-Unexpected - Chronosphere model
Maker - Pause concept

note: I added a stand animation to the chronosphere model so it won't fade after 6 seconds. It's file size is also smaller than the one in dota.

How to import:
¯¯¯¯¯¯¯¯¯¯¯
1. File -> Preferences -> Automaticly create unknown variables while pasting trigger data
2. Export chronosphere model and add it to your map
3. Copy the Pause and Chronosphere spells to your map
4. Copy the Chronosphere unit to your map.
5. Copy the Chronosphere trigger folder to your map
6. Ensure that _Pause and CH_Model is set properly in the ini trigger and add the ini trigger's code to YUOR map's ini trigger
7. Rate this spell
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

triggers

  • ini
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- This following spell can be used anywhere in your map as an alternative to pause --------
      • Set _Pause = Pause
      • -------- configurable --------
      • Set Config_CH_Spell = Chronosphere
      • Set Config_CH_Unit = Chronosphere
      • Set Config_CH_Duration = 2.00
      • Set Config_CH_lvlDuration = 2.00
      • Set Config_CH_AoE = 400.00
      • Set Config_CH_lvlAoE = 0.00
      • -------- Model causes lag on first cast.... Preloading. --------
      • Custom script: call RemoveUnit(CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), udg_Config_CH_Unit, 0, 0, 0))

  • Chronosphere ini
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Config_CH_Spell
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CH_Dex Equal to 0
        • Then - Actions
          • Trigger - Turn on Chronosphere loop <gen>
        • Else - Actions
      • Set CH_Dex = (CH_Dex + 1)
      • Set CH_Caster[CH_Dex] = (Triggering unit)
      • Set CH_lvl = (Level of Config_CH_Spell for CH_Caster[CH_Dex])
      • Set CH_p = (Target point of ability being cast)
      • -------- Chronosphere dummy must be owned by caster, otherwise true sight will not work --------
      • Unit - Create 1 Config_CH_Unit for (Owner of CH_Caster[CH_Dex]) at CH_p facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_CH_p)
      • Set CH_Effect[CH_Dex] = (Last created unit)
      • Unit - Add a (Config_CH_Duration + ((Real(CH_lvl)) x Config_CH_lvlDuration)) second Generic expiration timer to CH_Effect[CH_Dex]
      • Set CH_AoE[CH_Dex] = (Config_CH_AoE + ((Real(CH_lvl)) x Config_CH_lvlAoE))
      • -------- Next function has no effect if AoE is 400 --------
      • -------- The chronosphere looks odd if it's size is not 100%. I'm not a modeler so I can't fix it. If that is a probelm, use a diffirent model or fix it yourself. --------
      • Animation - Change CH_Effect[CH_Dex]'s size to ((CH_AoE[CH_Dex] / 4.00)%, 0.00%, 0.00%) of its original size

  • Chronosphere loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer CH_i) from 1 to CH_Dex, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (CH_Effect[CH_i] is alive) Equal to True
            • Then - Actions
              • Set CH_p = (Position of CH_Effect[CH_i])
              • Custom script: set bj_wantDestroyGroup=true
              • -------- I know I don't have to filter Chronosphere since it has locust and won't be picked, but for some reason - if I don't filter chronosphere - then the chronospheres can pause each other... --------
              • Unit Group - Pick every unit in (Units within CH_AoE[CH_i] of CH_p) and do (Actions)
                • Loop - Actions
                  • Set CH_unit = (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CH_unit Not equal to CH_Caster[CH_i]
                      • (Unit-type of CH_unit) Not equal to Chronosphere
                    • Then - Actions
                      • Unit Group - Add CH_unit to CH_Group
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (CH_unit is in CH_Group2) Equal to False
                        • Then - Actions
                          • Unit - Add _Pause to CH_unit
                          • Unit - Order CH_unit to Human Footman - Defend
                          • Unit - Pause the expiration timer for CH_unit
                          • Animation - Change CH_unit's animation speed to 0.00% of its original speed
                          • Unit Group - Add CH_unit to CH_Group2
                        • Else - Actions
                    • Else - Actions
              • Custom script: call RemoveLocation(udg_CH_p)
            • Else - Actions
              • Set CH_Caster[CH_i] = CH_Caster[CH_Dex]
              • Set CH_Effect[CH_i] = CH_Effect[CH_Dex]
              • Set CH_AoE[CH_i] = CH_AoE[CH_Dex]
              • Set CH_Dex = (CH_Dex - 1)
              • Set CH_i = (CH_i - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CH_Dex Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
      • Unit Group - Pick every unit in CH_Group2 and do (Actions)
        • Loop - Actions
          • Set CH_unit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (CH_unit is in CH_Group) Equal to False
            • Then - Actions
              • Unit - Remove _Pause from CH_unit
              • Unit - Unpause the expiration timer for CH_unit
              • Animation - Change CH_unit's animation speed to 100.00% of its original speed
              • Unit Group - Remove CH_unit from CH_Group2
            • Else - Actions
      • Unit Group - Remove all units from CH_Group



changelog

v1.1
-Changed filtering method
-Changed some variable names
-Use GUI function to clear groups

v1.0d
-Fixed as suggested here

v1.0c
-Moved the condition that turns looping trigger off back to the bottom
-Removed unnecessary group clear
-Removes unit from CH_Group

v1.0b
-Fixed configuration structure
-Only checks if spell instances are 0 upon de-index
Contents

Chronosphere (Map)

Reviews
Moderator
00:12, 5th June 2016 Tank-Commander: V1.0c - Problems resolved, approved (might want to change the filename to match the version number though) - could do with some minor improvements for the filtering method (setting a variable to a picked unit and...
  1. 00:12, 5th June 2016
    Tank-Commander: V1.0c - Problems resolved, approved (might want to change the filename to match the version number though) - could do with some minor improvements for the filtering method (setting a variable to a picked unit and then filtering) but it's short and sweet

    Old Reviews
    10:58, 30th May 2016
    Tank-Commander: V1.0 - The code still has needless structural issues from before (configuration should be part of the init and it is possible to only check if the group is empty upon recycling, while I know you said this glitches it, it doesn't make it impossible) given the simplicity of the spell I'd like to see these resolved - the spell is otherwise pretty good
     
  2. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,498
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    • Put all the configurables in a config trigger. There is no reason to always have to cache the configurables on cast
    • Add a configurable for the main ability
    • Avoid using single action functions (If/Then/Else)
    • Add a configurable for the chronosphere unit
    • For the Animation - Change Size function, you only need to change the value of the first field
    • You can merge the "spell" and "ini" trigger
    • For the unit group enumeration where you pause units in the area, add a filter that only pauses units that aren't already paused
    • Out of curiousity, why do you order paused units to "Human Footman - Defend" and why do you pause their "expiration timer"? Another question to add is why do they have an expiration timer in the first place?
    • You don't have to set Caster and Effect to "No unit"
    • I don't quite understand why you add them into a unit group like CH_Group and Temp_Targets when you remove them from the group every 0.03 seconds. You can just add them into a global unit group that makes it so that they don't get paused by another instance, and then a unit group array that pauses them from a specific instance. Maybe I'm just not understanding the logic completely, so an explanation would be nice.
     
  3. NightSkyAurora

    NightSkyAurora

    Joined:
    Mar 1, 2013
    Messages:
    528
    Resources:
    8
    Models:
    4
    Spells:
    4
    Resources:
    8
    Isn't that the second trigger?

    Ok I will in next update

    Check second action in second trigger

    Thanks, didn't knew

    Ok can work ^^

    I wanted to do that but I forgot >.< I just fixed it.

    The unit isn't paused. By casting that ability, the unit will look like it is paused (Defend is a cast ID of an channel ability)
    I intend to pause the life span of timed units such as illusions - a logical side effect when you are freezed in space time.

    To improve performance, otherwise I have to store spell duration in a variable. You mean the targets? They don't.

    Having a lot of variables that aren't null makes the game take long to exit. It is just good coding behaviour for me but I'll remove it.

    That is the secret behind the spell's performance. Pausing units is easy, but how do you unpause them? "Pick every unit in all units matching unit is in pausedGroup equal to false"? Not only is that inefficient, it will also cause bugs with other spells that pauses units (unless you check if the unit is in pausedGroup in every other spell).

    The dual group approach only compares units that WAS affected by chronosphere with the units that IS affected by chronosphere. If a unit is in CH_Group, it means that it WAS paused by chronosphere. I only need to check if that unit must still be paused by chronosphere (by checking if that unit is in Temp_Targets). In this way, I don't have to worry about units that was never paused in the first place.

    Thank you for your review :grin:
     
  4. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,498
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    It's pointless to be caching constant variables on cast. They should only be once, and that is on map init.

    Ahh I didn't test the map itself, I just looked at the triggers. Clever approach.

    And you think enumerating through unit group loops every 0.03 seconds is more efficient? xD On a side note, I didn't realize they weren't actually being paused. I still think it would be better to add affected units into a unit group array for the instance, and a global unit group to keep track of who is affected by all instances. This would mean you only clear the unit groups once, and that is during deindex.
     
  5. NightSkyAurora

    NightSkyAurora

    Joined:
    Mar 1, 2013
    Messages:
    528
    Resources:
    8
    Models:
    4
    Spells:
    4
    Resources:
    8
    I'm a little confused. What should be configurated in the config trigger?


    What if the unit is in 2 chronospheres? If 1 chronosphere ends, the unit will be unpaused inside another chronospher,


    Edit: dude after doing what you said in your 7th statement, the spell stops working!!!! I already uploaded that bug and now I cant fix it before I dont have wc3 with me :(
     
  6. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,498
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    Constant variables like duration, duration per level, the dummy unit, ability, etc.


    Why would they be unpaused if they are inside another chronosphere...?


    Please update the triggers so I can see what you did.
     
  7. Tank-Commander

    Tank-Commander

    Spell Reviewer

    Joined:
    May 26, 2009
    Messages:
    1,539
    Resources:
    44
    Packs:
    1
    Spells:
    41
    Tutorials:
    2
    Resources:
    44
    Most of the key things have already been said by KILLCIDE though I have this to add:
    - Your spell has recycling errors - AOE is not recycled leading to other instances getting incorrect AOEs
    - You only need to check to turn off the trigger when you recycle
    - A stun system could be utilised to stop the units from acting, this way orders will not be cancelled and you don't need to worry about keeping track of affected units in a global group
    - The spell is very functionally similar to Stop [v1.1] I would suggest adding some other features to make it stand out more
     
  8. NightSkyAurora

    NightSkyAurora

    Joined:
    Mar 1, 2013
    Messages:
    528
    Resources:
    8
    Models:
    4
    Spells:
    4
    Resources:
    8
    But that is what I did in the Chronosphere spell trigger. no?

    Sorry I think I misunderstood you. Do you mean each spell instance should have its own unit group? As well as a global unit group containing all the instance groups? If that is the case, I don't see the point of turning "Temp_Targets" into an array. Why not add all affected units to only 1 group? I then only need to compare 2 groups to each other when unpausing units.

    Fixed. Spell is functioning again.
    ===================================
    Thanks, I'll fix that.

    I tried that. It stops the spell from working...

    I try to make my spell as resource-independent as possible but I'll check out that system

    I only intended to make an approved version of chronosphere from DotA but I get your point. I'll add features such as stopping life & mana regen and some eye candy :thumbs_up:
     
  9. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,498
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    Please update your triggers if you made changes!

    It should be in a map init trigger. Do you see any sense in constantly storing "3.00" into CH_Duration and "0.00" into CH_lvlAoE every single time the spell is casted? You only have to do them once, and not every single time on cast.


    Keeping them in a group array lets you "unpause" them when the instance is done. Keeping them in a global group lets you pause units that need to be paused.
     
  10. NightSkyAurora

    NightSkyAurora

    Joined:
    Mar 1, 2013
    Messages:
    528
    Resources:
    8
    Models:
    4
    Spells:
    4
    Resources:
    8
    I updated the triggers...

    Right >.< I thought users might use it for various spells spells - each with its own configurations - but I guess its only used in systems. I'll fix that.

    How would you know if a unit is not in another instance group before unpausing it?
     
  11. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,498
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    I was talking about the description. I still see the same triggers from when you first uploaded it.

    If they are in the global group, that means they are still affected by an instance. You add units to the global group when they are affected by a chronosphere. When the spell instance deindexes, you remove them from the global group.
     
  12. NightSkyAurora

    NightSkyAurora

    Joined:
    Mar 1, 2013
    Messages:
    528
    Resources:
    8
    Models:
    4
    Spells:
    4
    Resources:
    8
    [​IMG]

    So if spell 1 ends, I remove it from the instance group and check if it is in the global group before unpausing it? It will ALWAYS be in the global group because instance 1 is in the global group.

    If I remove instance 1 from the global group, it might remove units inside other chronospheres as well.

    I'll add a change log in next update.
     
  13. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,498
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    I never said anything about unpausing units. The global group is to make sure that you don't pause units that are already paused. You unpause units from an instance by using the unit group array like I suggested. On deindex, you select the units in the unit group array, "unpause" them, and then remove them from the global group so that they may be affected by another instance.
     
  14. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,839
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Gather around everyone, because this is the time again I'm going to explain to the reviewers as to why Pause is used instead of stun.

    Ahh no. The purpose of the Chronosphere is to pause almost everything what's inside:
    1) Buffs.
    2) Animations
    3) other states.

    Why not stun???? first of all it can't do the 1 and 3.
    About 2, Pause can preserve the current played animation meanwhile stun will reset the animation to "stand" and play the start of the animation.
     
  15. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,498
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    The "reviewer" would like to know where units are ever paused in Night's triggers :) on a side note, I never suggested to use stun over pause, nor did I ever show a disagreement to actually using a pause.
     
  16. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,839
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    I posted my comment because it will be expected for the moderators to say "use stun instead of pause"
     
  17. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,498
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    Why would they suggest a stun over a pause if he never pauses the unit?
     
  18. Tank-Commander

    Tank-Commander

    Spell Reviewer

    Joined:
    May 26, 2009
    Messages:
    1,539
    Resources:
    44
    Packs:
    1
    Spells:
    41
    Tutorials:
    2
    Resources:
    44
    Almia I don't think I need to explain the difference between the words "could" and "must/should"
     
  19. NightSkyAurora

    NightSkyAurora

    Joined:
    Mar 1, 2013
    Messages:
    528
    Resources:
    8
    Models:
    4
    Spells:
    4
    Resources:
    8
    If the unit is in 2 chronospheres and Chronospheres 2 ends, the unit will be unpaused for 0.03 seconds till the loop fires again...