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

Spawn the Kraken

  • Like
Reactions: Kam
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



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!
Level 15
Joined
Jul 9, 2008
Messages
1,552
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
 
Level 15
Joined
Jul 9, 2008
Messages
1,552
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)
 
Level 18
Joined
Oct 17, 2012
Messages
818
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:
Level 15
Joined
Jul 9, 2008
Messages
1,552
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
 
Level 18
Joined
Oct 17, 2012
Messages
818
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:
Level 15
Joined
Jul 9, 2008
Messages
1,552
GhostHunter123 said:
Like I said, the point is convenience for the users in that all configurables are in one trigger.

all the configs are in 1 trigger the casting trigger....

GhostHunter123 said:
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.

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

GhostHunter123 said:
A major issue with your spell is the indexing method. I would look into Visualize: Dynamic Indexing.

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

GhostHunter123 said:
Resetting the variables at deindexing is pointless, except for variables you do not set during cast (though you could set those at cast as well, so you would not have to pointlessly reset them at deindexing).
In line with this is that nulling integers, real, booleans, and unit (not if the unit referenced will eventually be removed) variables is useless. These variable types are not handles, except for unit.
its always good practice to null variables the boolean is for if that instance is still being used since the indexing in none dynamic


GhostHunter123 said:
[For tracking instances, K_Index is more than enough. The K_NCasters variable is just extra.

no this is required for the indexing method im using
 
Level 18
Joined
Oct 17, 2012
Messages
818
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:
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)
 
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_")
 
Top