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. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  5. Dismiss Notice
  6. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  7. 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.

Spawn the Kraken

Submitted by millzy
This bundle is marked as approved. It works and satisfies the submission rules.
Description
Spawns the Kraken. Units are slowly pulled towards the Tentacles and take damage per second also when close enough to the tentacles they will attack

how to import:
-Copy the ability and tentlice unit into your map
-Check automoticly create unknown Variables while pasting trigger data.
-Copy the Kraken Folder with the triggers
-Set the abiliy cast condition correctly to ability u copyd
-Set the tentle creates correctly to the unit u copyd

You can easily change how long it lasts how strong the pull is on the units the damage they take every second

triggers


CONFIG
  • Kraken Config
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- how long the spell lasts in seconds --------
      • Set Krak_Config_Duration = 10
      • -------- ------------------------------------- --------
      • -------- Damage per seond The array is for each level --------
      • -------- ------------------------------------- --------
      • Set Krak_config_Damage[1] = 30.00
      • Set Krak_config_Damage[2] = 60.00
      • Set Krak_config_Damage[3] = 90.00
      • -------- ------------------------------------- --------
      • -------- Speed of the pulling to the center (positive will push the units away from the center) i suggest keeping this low again arrays are for each level --------
      • -------- ------------------------------------- --------
      • Set Krak_Config_pullSpeed[1] = -3.00
      • Set Krak_Config_pullSpeed[2] = -3.25
      • Set Krak_Config_pullSpeed[3] = -3.50
      • -------- ------------------------------------- --------
      • -------- the spawned unit --------
      • -------- ------------------------------------- --------
      • Set Krak_Config_tenticleunit = Tentacle
      • -------- ------------------------------------- --------
      • -------- The Swerling Special effect --------
      • -------- ------------------------------------- --------
      • Set Krak_Config_effects[1] = Abilities\Spells\Other\CrushingWave\CrushingWaveDamage.mdl
      • -------- ------------------------------------- --------
      • -------- The Special effect on Damaged units --------
      • -------- ------------------------------------- --------
      • Set Krak_Config_effects[2] = Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl



CAST
  • Kraken cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Kraken
    • Actions
      • -------- turn looping trigger on if not already --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Krak_NCasters Equal to 0
        • Then - Actions
          • Trigger - Turn on Kraken Loop <gen>
        • Else - Actions
      • Set Krak_index = (Krak_index + 1)
      • -------- Number of the instances being ran --------
      • Set Krak_NCasters = (Krak_NCasters + 1)
      • -------- is this instance on? --------
      • Set Krak_CastON[Krak_index] = True
      • Set Krak_Caster[Krak_index] = (Triggering unit)
      • Set Krak_Center[Krak_index] = (Target point of ability being cast)
      • -------- Damage the units takes every second --------
      • Set Krak_Damage[Krak_index] = Krak_config_Damage[(Level of (Ability being cast) for (Triggering unit))]
      • -------- Duration of the spell in seconds --------
      • Set Krak_Duration[Krak_index] = Krak_Config_Duration
      • Set Krak_timer[Krak_index] = 0.00
      • -------- how Strong the pull is --------
      • Set Krak_moveSpeed[Krak_index] = Krak_Config_pullSpeed[(Level of (Ability being cast) for (Triggering unit))]
      • -------- Tenticle spawns --------
      • For each (Integer INTLOOP) from 1 to 6, do (Actions)
        • Loop - Actions
          • Set Krak_temp_P[10] = (Krak_Center[Krak_index] offset by 100.00 towards (60.00 x (Real(INTLOOP))) degrees)
          • Unit - Create 1 Krak_Config_tenticleunit for (Owner of Krak_Caster[Krak_index]) at Krak_temp_P[10] facing Default building facing degrees
          • Unit - Add a (Real(Krak_Duration[Krak_index])) second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation(udg_Krak_temp_P[10])


loop actions
  • Kraken Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Krak_intLoop) from 1 to Krak_index, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Krak_CastON[Krak_intLoop] Equal to True
            • Then - Actions
              • -------- add to how long the spell has been casted --------
              • Set Krak_timer[Krak_intLoop] = (Krak_timer[Krak_intLoop] + 0.03)
              • Set Krak_effectTime[Krak_intLoop] = (Krak_effectTime[Krak_intLoop] + 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Krak_effectTime[Krak_intLoop] mod 2) Equal to 0
                • Then - Actions
                  • -------- Add to the angle for special effects --------
                  • Set Krak_effect[Krak_intLoop] = (Krak_effect[Krak_intLoop] + 15.00)
                  • Set Krak_temp_P[1] = (Krak_Center[Krak_intLoop] offset by 200.00 towards (Krak_effect[Krak_intLoop] + ((Real(Krak_effectLoop[Krak_intLoop])) x 180.00)) degrees)
                  • Set Krak_temp_P[2] = (Krak_Center[Krak_intLoop] offset by 200.00 towards (Krak_effect[Krak_intLoop] + ((Real(Krak_effectLoop[Krak_intLoop])) x 0.00)) degrees)
                  • Set Krak_temp_P[3] = (Krak_Center[Krak_intLoop] offset by 350.00 towards (Krak_effect[Krak_intLoop] + ((Real(Krak_effectLoop[Krak_intLoop])) x 90.00)) degrees)
                  • Set Krak_temp_P[4] = (Krak_Center[Krak_intLoop] offset by 350.00 towards (Krak_effect[Krak_intLoop] + ((Real(Krak_effectLoop[Krak_intLoop])) x 270.00)) degrees)
                  • For each (Integer Krak_effectLoop[Krak_intLoop]) from 0 to 4, do (Actions)
                    • Loop - Actions
                      • Special Effect - Create a special effect at Krak_temp_P[Krak_effectLoop[Krak_intLoop]] using Krak_Config_effects[1]
                      • Special Effect - Destroy (Last created special effect)
                  • Custom script: call RemoveLocation(udg_Krak_temp_P[1])
                  • Custom script: call RemoveLocation(udg_Krak_temp_P[2])
                  • Custom script: call RemoveLocation(udg_Krak_temp_P[3])
                  • Custom script: call RemoveLocation(udg_Krak_temp_P[4])
                  • Custom script: set bj_wantDestroyGroup=true
                • Else - Actions
              • Unit Group - Pick every unit in (Units within 360.00 of Krak_Center[Krak_intLoop]) and do (Actions)
                • Loop - Actions
                  • Set Krak_Currentunit = (Picked unit)
                  • -------- Filter for units u want to move --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Krak_Currentunit is A structure) Equal to False
                      • (Krak_Currentunit is A flying unit) Equal to False
                      • (Krak_Currentunit is alive) Equal to True
                      • (Krak_Currentunit is Magic Immune) Equal to False
                      • (Krak_Currentunit belongs to an enemy of (Owner of Krak_Caster[Krak_intLoop])) Equal to True
                    • Then - Actions
                      • Set Krak_temp_P[5] = (Position of Krak_Currentunit)
                      • Set Krak_temp_P[6] = (Krak_temp_P[5] offset by Krak_moveSpeed[Krak_intLoop] towards (Angle from Krak_Center[Krak_intLoop] to Krak_temp_P[5]) degrees)
                      • Set Krak_X = (X of Krak_temp_P[6])
                      • Set Krak_Y = (Y of Krak_temp_P[6])
                      • Custom script: call SetUnitX( udg_Krak_Currentunit , udg_Krak_X )
                      • Custom script: call SetUnitY( udg_Krak_Currentunit , udg_Krak_Y )
                      • Custom script: call RemoveLocation(udg_Krak_temp_P[5])
                      • Custom script: call RemoveLocation(udg_Krak_temp_P[6])
                      • Set Krak_Currentunit = No unit
                    • Else - Actions
              • -------- if its been 1 second pick units to Damage --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Krak_timer[Krak_intLoop] Greater than or equal to 1.00
                • Then - Actions
                  • Set Krak_seconds[Krak_intLoop] = (Krak_seconds[Krak_intLoop] + 1)
                  • Set Krak_timer[Krak_intLoop] = 0.00
                  • Custom script: set bj_wantDestroyGroup=true
                  • Unit Group - Pick every unit in (Units within 315.00 of Krak_Center[Krak_intLoop]) and do (Actions)
                    • Loop - Actions
                      • Set Krak_Currentunit = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Krak_Currentunit is A structure) Equal to False
                          • (Krak_Currentunit is A flying unit) Equal to False
                          • (Krak_Currentunit is Magic Immune) Equal to False
                          • (Krak_Currentunit is alive) Equal to True
                          • (Krak_Currentunit belongs to an enemy of (Owner of Krak_Caster[Krak_intLoop])) Equal to True
                        • Then - Actions
                          • Set Krak_temp_P[7] = (Position of Krak_Currentunit)
                          • Unit - Cause Krak_Caster[Krak_intLoop] to damage Krak_Currentunit, dealing Krak_Damage[Krak_intLoop] damage of attack type Spells and damage type Normal
                          • Special Effect - Create a special effect at Krak_temp_P[7] using Krak_Config_effects[2]
                          • Special Effect - Destroy (Last created special effect)
                          • Custom script: call RemoveLocation(udg_Krak_temp_P[7])
                          • Set Krak_Currentunit = No unit
                        • Else - Actions
                • Else - Actions
              • -------- If Duration is up null varibles --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Krak_seconds[Krak_intLoop] Equal to Krak_Duration[Krak_intLoop]
                • Then - Actions
                  • Set Krak_NCasters = (Krak_NCasters - 1)
                  • Set Krak_CastON[Krak_intLoop] = False
                  • Custom script: call RemoveLocation(udg_Krak_Center[udg_Krak_intLoop])
                  • Set Krak_seconds[Krak_intLoop] = 0
                  • Set Krak_effectTime[Krak_intLoop] = 0
                  • Set Krak_effect[Krak_intLoop] = 0.00
                  • -------- if no one is no longer casting the spell turn it off and reset the index --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Krak_NCasters Equal to 0
                    • Then - Actions
                      • Trigger - Turn off (This trigger)
                      • Set Krak_index = 0
                    • Else - Actions
                • Else - Actions
            • Else - Actions





Change log:

V 1.0
- First upload

V1.1
- Made the configs for the spell in its own separate trigger.
-Removed unneeded Nulling of Varaibles

V1.2
- added another config for the strength of the pulling effect
-increased the prefrex from k to Krak
-reduced the amount of effects by half and cleaned them up a bit
Contents

Spawn Kraken (Map)

Reviews
PurgeandFire
Thanks for following up with the updates via PM's. I think some of the stuff could still be cleaned up (like the 4 RemoveLocation lines could be put within the loop where you make the effects), but the triggers look a lot better! Approved!
  1. Daffa

    Daffa

    Joined:
    Jan 30, 2013
    Messages:
    7,745
    Resources:
    28
    Packs:
    1
    Maps:
    8
    Spells:
    17
    Tutorials:
    2
    Resources:
    28
    Make special effect configurable
    separate config into another trigger run at map init
    tentacle needs to be configurable
    avoid Integer A/B
     
  2. millzy

    millzy

    Joined:
    Jul 9, 2008
    Messages:
    1,540
    Resources:
    6
    Maps:
    5
    Spells:
    1
    Resources:
    6
    so add a variable for the speical effect type
    so another bunch of variables that are set on map int that are used in the spell cast? (i dont believe this is necessary since all the configs are set up on the spell cast but if thats the standard i can add them)
    what do u mean another unit type variable for the spawn?
    alright then
     
  3. Daffa

    Daffa

    Joined:
    Jan 30, 2013
    Messages:
    7,745
    Resources:
    28
    Packs:
    1
    Maps:
    8
    Spells:
    17
    Tutorials:
    2
    Resources:
    28
    yes, attachment points too
    it's for efficiency, unless your spell dependant on values like str
    the tentacle should be a choice for players. they might use their own custom version
     
  4. millzy

    millzy

    Joined:
    Jul 9, 2008
    Messages:
    1,540
    Resources:
    6
    Maps:
    5
    Spells:
    1
    Resources:
    6
    the speical effects arnt attached to units
    how is adding extra unnecessary config variables that is configed again on spell cast more efficient?
    i guess i can add config for the tentacle with another variable (even tho it only requires 1 change to the spell cast and a boolean on the removal trigger)
     
  5. GhostHunter123

    GhostHunter123

    Joined:
    Oct 17, 2012
    Messages:
    451
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Everything the user can change would be in one trigger, so that he does not have to look through the entire spell.

    Frankly, the spell should have a lot more manipulable fields, especially the unit type created and the effects, which are inconveniently located on the second trigger, than what is provided on the casting trigger, so a separate trigger for config would be necessary.

    [Retracted]
     
    Last edited: Mar 15, 2018
  6. millzy

    millzy

    Joined:
    Jul 9, 2008
    Messages:
    1,540
    Resources:
    6
    Maps:
    5
    Spells:
    1
    Resources:
    6
    ill add the config variables for the special effect and the spawned units.

    altho i really dont see the point in having

    • Melee Initialization
      • Events
        • Map initialization
      • Conditions
      • Actions
    • set Config_k_damage = 30
    • set Config_k_duration = 10
    • ect......


    • raken cast
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to Kraken
      • Actions
        • -------- turn looping trigger on if not already --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • K_NCasters Equal to 0
          • Then - Actions
            • Trigger - Turn on Kraken Loop <gen>
          • Else - Actions
        • Set K_index = (K_index + 1)
        • Set K_NCasters = (K_NCasters + 1)
        • Set K_CastON[K_index] = True
        • Set K_Caster[K_index] = (Triggering unit)
        • Set K_Center[K_index] = (Target point of ability being cast)
        • Set K_Damage[K_index] = (Config_k_damage x (Real((Level of Kraken for K_Caster[K_index]))))
        • -------- Duration of the spell in seconds --------
        • Set K_Duration[K_index] = Config_k_duration
        • ect.....


    when u can just config them in the casting trigger like ALOT of people do. there are plenty of spells on here i can link to show you
     
  7. GhostHunter123

    GhostHunter123

    Joined:
    Oct 17, 2012
    Messages:
    451
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Like I said, the point is convenience for the users in that all configurables are in one trigger.

    I have seen a lot of spells, primarily old ones, also place configurables in the cast trigger. However, these spells use extra variables. Therefore, configurables are set during each cast. This process is computationally more expensive than setting them once on Init. In the case of your spell, users directly change the values of the array, so the above is not an issue for you.

    In line with this is that nulling integers, real, and booleans is useless.

    [Retracted]
     
    Last edited: Mar 15, 2018
  8. millzy

    millzy

    Joined:
    Jul 9, 2008
    Messages:
    1,540
    Resources:
    6
    Maps:
    5
    Spells:
    1
    Resources:
    6
    all the configs are in 1 trigger the casting trigger....

    it also allows usersers a easier option for changing values for each level of the spell if they wish.also every thing needs to be set in the arrarys to e.g keep track of that current spells duration

    im simply using none Dynamic indexing [Trigger] - Why dynamic indexing is flawed and people should use linked list instead

    its always good practice to null variables the boolean is for if that instance is still being used since the indexing in none dynamic


    no this is required for the indexing method im using
     
  9. GhostHunter123

    GhostHunter123

    Joined:
    Oct 17, 2012
    Messages:
    451
    Resources:
    1
    Spells:
    1
    Resources:
    1
    All configs would not be in one trigger, if you add in the unit type and the special effects. I hope you are not planning to add these to the cast trigger.

    Users should not have to touch the main code to change your spell according to their needs. This way to config is less error prone on the user side.
     
    Last edited: Apr 24, 2018
  10. millzy

    millzy

    Joined:
    Jul 9, 2008
    Messages:
    1,540
    Resources:
    6
    Maps:
    5
    Spells:
    1
    Resources:
    6
    remove the boolean and watch the spell fail when cast multiple times

    you need to understand there are multiple ways of doing things
     
    Last edited: Mar 15, 2018
  11. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,656
    Resources:
    18
    Maps:
    1
    Spells:
    11
    Tutorials:
    6
    Resources:
    18
    Weirdly clean code by GUI standards..

    I like how you managed to group the special effects, variable declaration and custom in small groups.
     
  12. Daffa

    Daffa

    Joined:
    Jan 30, 2013
    Messages:
    7,745
    Resources:
    28
    Packs:
    1
    Maps:
    8
    Spells:
    17
    Tutorials:
    2
    Resources:
    28
    Despite it being point, making the SFX possible to change in a string makes it easier.

    The efficiency is seen with more cast is done, where the same value is not set multiple time. It's negligible though, but it reduces user error.

    Just a note, standard changes over time.
     
  13. millzy

    millzy

    Joined:
    Jul 9, 2008
    Messages:
    1,540
    Resources:
    6
    Maps:
    5
    Spells:
    1
    Resources:
    6
    Updated with the extra configs
     
  14. Krakenn99

    Krakenn99

    Joined:
    Jun 26, 2014
    Messages:
    482
    Resources:
    1
    Maps:
    1
    Resources:
    1
    I have been spawned!
     
  15. Tasyen

    Tasyen

    Joined:
    Jul 18, 2010
    Messages:
    1,411
    Resources:
    18
    Tools:
    2
    Maps:
    3
    Spells:
    8
    Tutorials:
    4
    JASS:
    1
    Resources:
    18
    Needs Fixed
    • "The PREFIX length should be at least 3-4 characters long, or even more, to ensure some uniqueness."
    • Data setup should be inside the config:
      • AoE, Tentakel Amount, Tentakel distance, Spinning Water distance.
    • -------- If Duration is up null varibles --------
      • Can only happen after the damage code is executed, it would be better to move it into the "
        K_timer[K_intLoop] greater equal 1.00" if.
    Suggestion:
    • Duration, AoE, Tentakel Amount & PullPower supporting multiple Levels.
    • the spinning water distance could refer directly to the AoE settings (AoE[level] * 0.9) (inside the config).
    • On Default set "pullpower a second" instead of "pullpower a intervale", Pullspeed a second is alot more easy to understand/balance for the user.
      • ( pull a second * System intervale)
      • -3 => (-100 * 0.03)
     
  16. Tank-Commander

    Tank-Commander

    Spell Reviewer

    Joined:
    May 26, 2009
    Messages:
    1,540
    Resources:
    44
    Packs:
    1
    Spells:
    41
    Tutorials:
    2
    Resources:
    44
    Hi thanks for the submission.

    I like the concept of the spell but I find the configuration options a bit lacking and there's some efficiency boosts that could be done to make it much better:
    - The effects made by the loop should be made less often or have the option to be made often (otherwise you're creating over 100 effects every second which do nothing other than visuals and is really unnecessary)
    - Those effects could also be made via a loop and different offsets rather than each angle being manually entered
    - Effect Offsets and the like could all be configurable
    - AOE/Pull/Tentacle type (think water elemental)/Number of Tenctacles/Duration/etc. could all be configurable and support multi-levelling as mentioned by Taysen
    - AttackType and DamageType could also be configurable the ability used as a base could also be configurable
    - Instead of having 0.03 hardcoded at various points in the spell it'd be better to have it as a configurable constant and then refer to that constant
    - Your spell requires a 3-4 character Prefix to identify its variables uniquely from other spells (something like "SpKr_")
     
  17. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,426
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    Thanks for following up with the updates via PM's.

    I think some of the stuff could still be cleaned up (like the 4 RemoveLocation lines could be put within the loop where you make the effects), but the triggers look a lot better!

    Approved!
     
  18. BlackRangerXIII

    BlackRangerXIII

    Joined:
    Dec 25, 2010
    Messages:
    977
    Resources:
    0
    Resources:
    0
    Oh hey, Hydroid's Tentacle Swarm. Nice