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

Double Spinning Blade v1.1.5

I just thinking, i join hive for what? modding right? so i guess one resource is better than nothing.

Double Spinning Blade
The User throw a spinning blade towards the target point, for set amount of time the blade will destroyed and the user's illusion will appeared at blade's location. Then he throw a spinning blade again to the user's current location.
Level 1 - 75 damage.
Level 2 - 100 damage.
Level 3 - 125 damage.

[highlight]READ!! IMPORTANT!![/code]
[highlight]How to Import[/code]
Go to World Editor => file => Preferences => Check the "Automatically create unknown Variable while pasting trigger data" => ok
Copy all triggers (except "Do not import this" trigger) to your map
then open Object Editor, copy the "Spinning Blade" and "Rokhan Dummy" to your map. and store them into Configuration Trigger
(Set DSB_Dummy_Type = Spinning Blade and Set DSB_Dummy_Type2 = Rokhan Dummy)
remember, the first dummy type is for the blade, and the second dummy type is for the illusion

  • Configuration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- --------------------------------------------- --------
      • -------- Store your ability id here --------
      • Set DSB_Ability_ID = Double Spinning Blade
      • -------- Store your dummy here --------
      • Set DSB_Dummy_Type = Spinning Blade
      • Set DSB_Dummy_Type2 = Rokhan Dummy
      • -------- Your Dummy's animation when cast the spell --------
      • Set DSB_Dummy2_Animation = attack
      • -------- Your Dummy's animation speed when play it's animation --------
      • Set DSB_Animation_Speed = 200.00
      • -------- Your 2nd Dummy's expiration timer --------
      • Set DSB_Dummy2_Lifetime = 1.00
      • -------- Your 2nd Dummy's color (RGB) --------
      • Set DSB_Dummy2_RED = 60.00
      • Set DSB_Dummy2_GREEN = 60.00
      • Set DSB_Dummy2_BLUE = 60.00
      • -------- Your 2nd Dummy's transparency --------
      • Set DSB_Dummy2_Transparency = 60.00
      • -------- Your ability's damage when it's hit enemies in the line --------
      • Set DSB_Damage[1] = 75.00
      • Set DSB_Damage[2] = 100.00
      • Set DSB_Damage[3] = 125.00
      • -------- Area of Effect of the ability --------
      • Set DSB_AoE = 150.00
      • -------- How far your blade travels --------
      • Set DSB_Distance = 1000.00
      • -------- How far your blade spawns --------
      • Set DSB_Start_Range = 100.00
      • -------- Sound Effect which will appear when your caster cast the spell. Set it to no sound if you don't want to play a sound --------
      • Set DSB_SoundEffect = HeroShadowhunterMissileLaunch1 <gen>
      • -------- Special Effect which spawn when the blade hits your enemies --------
      • Set DSB_Special_Effect = Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
      • -------- which point your special effect will spawned at? head/chest/hand/overhead/origin, etc --------
      • Set DSB_Special_Effect_Location = chest
      • -------- Yes = Will Destroy Trees / No = Won't Destroy Trees --------
      • Set DSB_Destroy_Tree = True
      • -------- Do you want your shadow throw the blade back to you? if yes, set this to "True". if no, set this to "False" --------
      • Set DSB_Shadow = True
      • -------- --------------------------------------------- --------
      • -------- Conditions Configuration --------
      • -------- --------------------------------------------- --------
      • -------- Units Belongs to enemy player --------
      • Set DSB_Conditions[1] = True
      • -------- Units is Alive --------
      • Set DSB_Conditions[2] = True
      • -------- Units is Magic Immune --------
      • Set DSB_Conditions[3] = False
      • -------- Units is a Structure --------
      • Set DSB_Conditions[4] = False
      • -------- Units is in UnDamage Group (to prevent damage looping) --------
      • Set DSB_Conditions[5] = False
      • -------- --------------------------------------------- --------
      • -------- DO NOT CHANGE THIS (BELOW) --------
      • -------- --------------------------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DSB_Destroy_Tree Equal to True
        • Then - Actions
          • Set TempPoint = (Center of (Playable map area))
          • Unit - Create 1 Peasant for Neutral Passive at TempPoint facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_TempPoint)
          • Set DSB_Destroyer = (Last created unit)
          • Unit - Hide DSB_Destroyer
        • Else - Actions
      • -------- --------------------------------------------- --------
  • Double Spinning Blade
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to DSB_Ability_ID
    • Actions
      • Set DSB_Max_Index = (DSB_Max_Index + 1)
      • Set DSB_Owner[DSB_Max_Index] = (Triggering player)
      • Set DSB_Caster[DSB_Max_Index] = (Triggering unit)
      • Set DSB_Ability_Level[DSB_Max_Index] = (Level of DSB_Ability_ID for DSB_Caster[DSB_Max_Index])
      • Set TempPoint = (Position of DSB_Caster[DSB_Max_Index])
      • Set TempPoint2 = (Target point of ability being cast)
      • Set DSB_Angle[DSB_Max_Index] = (Angle from TempPoint to TempPoint2)
      • Set TempPoint3 = (TempPoint offset by DSB_Start_Range towards DSB_Angle[DSB_Max_Index] degrees)
      • Sound - Play DSB_SoundEffect at 100.00% volume, located at TempPoint with Z offset 0.00
      • Unit - Create 1 DSB_Dummy_Type for DSB_Owner[DSB_Max_Index] at TempPoint3 facing DSB_Angle[DSB_Max_Index] degrees
      • Set DSB_Dummy[DSB_Max_Index] = (Last created unit)
      • Unit - Add a ((DSB_Distance x 0.03) x 0.03) second Generic expiration timer to DSB_Dummy[DSB_Max_Index]
      • Set DSB_Shdow[DSB_Max_Index] = True
      • Set DSB_Stage[DSB_Max_Index] = 1
      • Custom script: set udg_DSB_UnDamage_Group[udg_DSB_Max_Index] = CreateGroup()
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DSB_Max_Index Equal to 1
        • Then - Actions
          • Trigger - Turn on DSB Loop <gen>
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: call RemoveLocation(udg_TempPoint3)
  • DSB Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer DSB_Current_Index) from 1 to DSB_Max_Index, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DSB_Stage[DSB_Current_Index] Equal to 1
            • Then - Actions
              • Set TempPoint = (Position of DSB_Dummy[DSB_Current_Index])
              • Set TempPoint2 = (TempPoint offset by (DSB_Distance x 0.03) towards DSB_Angle[DSB_Current_Index] degrees)
              • Unit - Move DSB_Dummy[DSB_Current_Index] instantly to TempPoint2
              • Set DSB_Damage_Group = (Units within DSB_AoE of TempPoint)
              • Unit Group - Pick every unit in DSB_Damage_Group and do (Actions)
                • Loop - Actions
                  • Set TempUnit = (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (TempUnit belongs to an enemy of DSB_Owner[DSB_Current_Index]) Equal to DSB_Conditions[1]
                      • (TempUnit is alive) Equal to DSB_Conditions[2]
                      • (TempUnit is Magic Immune) Equal to DSB_Conditions[3]
                      • (TempUnit is A structure) Equal to DSB_Conditions[4]
                      • (TempUnit is in DSB_UnDamage_Group[DSB_Current_Index]) Equal to DSB_Conditions[5]
                    • Then - Actions
                      • Unit - Cause DSB_Caster[DSB_Current_Index] to damage TempUnit, dealing DSB_Damage[DSB_Ability_Level[DSB_Current_Index]] damage of attack type Spells and damage type Normal
                      • Special Effect - Create a special effect attached to the DSB_Special_Effect_Location of TempUnit using DSB_Special_Effect
                      • Special Effect - Destroy (Last created special effect)
                      • Unit Group - Add TempUnit to DSB_UnDamage_Group[DSB_Current_Index]
                    • Else - Actions
              • Custom script: call DestroyGroup(udg_DSB_Damage_Group)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DSB_Destroy_Tree Equal to True
                • Then - Actions
                  • Destructible - Pick every destructible within DSB_AoE of TempPoint and do (Actions)
                    • Loop - Actions
                      • Set TempDest = (Picked destructible)
                      • Unit - Order DSB_Destroyer to Harvest TempDest
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Current order of DSB_Destroyer) Equal to (Order(harvest))
                        • Then - Actions
                          • Destructible - Kill TempDest
                        • Else - Actions
                      • Unit - Order DSB_Destroyer to Stop
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (DSB_Dummy[DSB_Current_Index] is dead) Equal to True
                • Then - Actions
                  • Custom script: call DestroyGroup(udg_DSB_UnDamage_Group[udg_DSB_Current_Index])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • DSB_Shdow[DSB_Current_Index] Equal to True
                    • Then - Actions
                      • Custom script: set udg_DSB_UnDamage_Group[udg_DSB_Max_Index] = CreateGroup()
                      • Set DSB_Stage[DSB_Current_Index] = 2
                      • Set TempPoint2 = (Position of DSB_Caster[DSB_Current_Index])
                      • Unit - Create 1 DSB_Dummy_Type2 for DSB_Owner[DSB_Current_Index] at TempPoint facing TempPoint2
                      • Set DSB_Dummy2[DSB_Current_Index] = (Last created unit)
                      • Unit - Add a DSB_Dummy2_Lifetime second Generic expiration timer to DSB_Dummy2[DSB_Current_Index]
                      • Animation - Change DSB_Dummy2[DSB_Current_Index]'s animation speed to DSB_Animation_Speed% of its original speed
                      • Animation - Change DSB_Dummy2[DSB_Current_Index]'s vertex coloring to (DSB_Dummy2_RED%, DSB_Dummy2_GREEN%, DSB_Dummy2_BLUE%) with DSB_Dummy2_Transparency% transparency
                      • Animation - Play DSB_Dummy2[DSB_Current_Index]'s DSB_Dummy2_Animation animation
                      • Set TempPoint = (Position of DSB_Dummy2[DSB_Current_Index])
                      • Set DSB_Angle[DSB_Current_Index] = (Angle from TempPoint to TempPoint2)
                      • Custom script: call RemoveLocation(udg_TempPoint2)
                      • Set TempPoint3 = (TempPoint offset by DSB_Start_Range towards DSB_Angle[DSB_Current_Index] degrees)
                      • Unit - Remove DSB_Dummy[DSB_Current_Index] from the game
                      • Unit - Create 1 DSB_Dummy_Type for DSB_Owner[DSB_Current_Index] at TempPoint3 facing DSB_Angle[DSB_Current_Index] degrees
                      • Set DSB_Dummy[DSB_Current_Index] = (Last created unit)
                      • Unit - Add a ((DSB_Distance x 0.03) x 0.03) second Generic expiration timer to DSB_Dummy[DSB_Current_Index]
                      • Custom script: call RemoveLocation(udg_TempPoint)
                      • Custom script: call RemoveLocation(udg_TempPoint3)
                    • Else - Actions
                      • Unit - Remove DSB_Dummy[DSB_Current_Index] from the game
                      • Set DSB_Shdow[DSB_Current_Index] = DSB_Shdow[DSB_Max_Index]
                      • Set DSB_Dummy[DSB_Current_Index] = DSB_Dummy[DSB_Max_Index]
                      • Set DSB_Dummy[DSB_Max_Index] = No unit
                      • Set DSB_Caster[DSB_Current_Index] = DSB_Caster[DSB_Max_Index]
                      • Set DSB_Caster[DSB_Max_Index] = No unit
                      • Set DSB_Angle[DSB_Current_Index] = DSB_Angle[DSB_Max_Index]
                      • Set DSB_Angle[DSB_Max_Index] = 0.00
                      • Set DSB_Ability_Level[DSB_Current_Index] = DSB_Ability_Level[DSB_Max_Index]
                      • Set DSB_Ability_Level[DSB_Max_Index] = 0
                      • Set DSB_Stage[DSB_Current_Index] = DSB_Stage[DSB_Max_Index]
                      • Set DSB_Stage[DSB_Max_Index] = 0
                      • Set DSB_Current_Index = (DSB_Current_Index - 1)
                      • Set DSB_Max_Index = (DSB_Max_Index - 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • DSB_Max_Index Equal to 0
                        • Then - Actions
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
                • Else - Actions
              • Custom script: call RemoveLocation(udg_TempPoint)
              • Custom script: call RemoveLocation(udg_TempPoint2)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DSB_Stage[DSB_Current_Index] Equal to 2
                • Then - Actions
                  • Set TempPoint = (Position of DSB_Dummy[DSB_Current_Index])
                  • Set TempPoint2 = (TempPoint offset by (DSB_Distance x 0.03) towards DSB_Angle[DSB_Current_Index] degrees)
                  • Unit - Move DSB_Dummy[DSB_Current_Index] instantly to TempPoint2
                  • Set DSB_Damage_Group = (Units within DSB_AoE of TempPoint)
                  • Unit Group - Pick every unit in DSB_Damage_Group and do (Actions)
                    • Loop - Actions
                      • Set TempUnit = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (TempUnit belongs to an enemy of DSB_Owner[DSB_Current_Index]) Equal to DSB_Conditions[1]
                          • (TempUnit is alive) Equal to DSB_Conditions[2]
                          • (TempUnit is Magic Immune) Equal to DSB_Conditions[3]
                          • (TempUnit is A structure) Equal to DSB_Conditions[4]
                          • (TempUnit is in DSB_UnDamage_Group[DSB_Current_Index]) Equal to DSB_Conditions[5]
                        • Then - Actions
                          • Unit - Cause DSB_Caster[DSB_Current_Index] to damage TempUnit, dealing DSB_Damage[DSB_Ability_Level[DSB_Current_Index]] damage of attack type Spells and damage type Normal
                          • Special Effect - Create a special effect attached to the DSB_Special_Effect_Location of TempUnit using DSB_Special_Effect
                          • Special Effect - Destroy (Last created special effect)
                          • Unit Group - Add TempUnit to DSB_UnDamage_Group[DSB_Current_Index]
                        • Else - Actions
                  • Custom script: call DestroyGroup(udg_DSB_Damage_Group)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • DSB_Destroy_Tree Equal to True
                    • Then - Actions
                      • Destructible - Pick every destructible within DSB_AoE of TempPoint and do (Actions)
                        • Loop - Actions
                          • Set TempDest = (Picked destructible)
                          • Unit - Order DSB_Destroyer to Harvest TempDest
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Current order of DSB_Destroyer) Equal to (Order(harvest))
                            • Then - Actions
                              • Destructible - Kill TempDest
                            • Else - Actions
                          • Unit - Order DSB_Destroyer to Stop
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (DSB_Dummy[DSB_Current_Index] is dead) Equal to True
                    • Then - Actions
                      • Set DSB_Shdow[DSB_Current_Index] = False
                      • Set DSB_Stage[DSB_Current_Index] = 1
                    • Else - Actions
                  • Custom script: call RemoveLocation(udg_TempPoint)
                  • Custom script: call RemoveLocation(udg_TempPoint2)
                • Else - Actions
232216-albums6736-picture73747.jpg

232216-albums6736-picture73746.jpg

232216-albums6736-picture73745.jpg

232216-albums6736-picture73744.jpg


Feedbacks and Suggestions is appreciated



v1.1.5
Added Follow Through Time
Added Sound
Minor Changes

v1.1.4
Dummy's Animation Speed is now configurable
You can change Double Spinning Blade to Single Spinning Blade with boolean (Configurable)

v1.1.3
Create the peasant for neutral passive
Remove the Dummy Removal Trigger
DSB_Damage_Group isn't an array group anymore
The dummies' vision is reduced to 500 (day/night)

v1.1.2
Remove Leaks

v1.1.1
Minor Changes

v1.1
Set unit variable after hide unit action - Fixed
Remove Location (TempPoint and TempPoint2) at Cast Trigger
Store Picked Unit to TempUnit
Store Picked Dest to TempDest
Remove Current Stage Checker
Remove Location before changing stage
The Turn Off ITE is now moved to de-indexing portion of the spell
De-Index ability level

v1.0
Released


Keywords:
Rheiko, Double, Two, Spinning, Spin, Blade, Shuriken, Double Spinning Blade, Shadow, Illusion, Throw.
Contents

Double Spinning Blade v1.1.5 (Map)

Reviews
Double Spinning Blade v1.1.4 | Reviewed by Maker | 27th Sep 2013 APPROVED You put an inventive spin on the ability by having the shadow throw the projectile back. You made a solid ability Don't create the harvester if...

Moderator

M

Moderator


Double Spinning Blade v1.1.4 | Reviewed by Maker | 27th Sep 2013
APPROVED


126248-albums6177-picture66521.png


You put an inventive spin on the ability by having the shadow
throw the projectile back.
You made a solid ability
126248-albums6177-picture66523.png


  • Don't create the harvester if "destroy trees" is false
  • Add a bit of follow through time so the caster finishes the
    cast animation
  • Try to get rid of duplicate action blocks, like the deindexing block
  • Set the death type of the Spinning blade to Can't raise, does not decay
  • The projectile could make some sound or use a casting sound
[tr]



Double Spinning Blade v1.1.2 | Reviewed by Maker | 15th Sep 2013
NEEDS FIX


126248-albums6177-picture66522.png


  • Create the peasant for neutral passive, hidden units reserve food
  • Get rid of the A unit dies trigger. You can set the Art - death time to 0.
    Make the dummies have Can't raise, does not decay death type
126248-albums6177-picture66523.png


  • DSB_Damage_Group does not need to be an array
  • The dummies give a lot of vision
[tr]

 
Level 22
Joined
Aug 27, 2013
Messages
3,973
I'll test it after (if i'm not too lazy~) and tell you what i think of it :)

EDIT : I think you can just use the alpha canal for the dummy.
Just wondering why use a peasant to destroy the trees ?
if i didn't use peasant, it will also destroy the other destructibles

So just remove it since the beggining.
what do you mean by that and how?

Thanks for the feedbacks everyone :3
 
Level 22
Joined
Aug 27, 2013
Messages
3,973
grrr,
you are so fu*cking a*noy*ng
okay.. i will explain it from the beginning
first of all, if you didn't use something like this it will also destroy the other destructible
to avoid this problem, first i create a dummy peasant at the beginning.. when i want to destroy the tree, i will order that dummy to check wether that destructible is a tree or not using "harvest" if it's tree, destroy the tree. if it's not ---
can you understand? this is a trick, maybe i will need mag to explain it to you if you are still not understand it
 
  • Like
Reactions: ILH
Level 20
Joined
Aug 13, 2013
Messages
1,696
Why create a dummy peasant at the beggining ?

Peasant is used to cut or harvest ONLY TREES not other destructible like BRIDGES.. Now to used a peasant you must pick any destructible and order a peasant to harvest that destructible if peasant CAN'T harvest bridges so it will not be picked as a desired tree. So harvest picked trees right??? so the only destructible selected is trees. This can be done in ITE if the current order of the peasant in harvest that tree then kill that tree. Then after that ITE cond, stop the order. Anyway you can add this line for safety in the tree destroyer setup for adding harvester ability to the peasant
  • Custom script: call UnitAddAbility(udg_your_unit,'Aloc')
 
  • Like
Reactions: ILH
Level 13
Joined
Mar 29, 2012
Messages
530
Review :
  • You forgot to remove location stored in TempPoint and TempPoint2.
  • Store (Picked unit) and use it to check valid units and more.
  • Same goes to (Picked destructable).
  • You don't need to check if the current stage is 1 or 2 again.
  • When the spell is going to change to stage 2, remove the location in TempPoint and TempPoint2 first.

Suggestions :
  • Make attack-type and damage-type configurable.
  • Store the (Order(harvest)) into a variable with type Order.
  • To pick nearby units, use "Custom script: set bj_wantDestroyGroup = true" instead. If you still want to use the current way, you don't need to make the DSB_Damage_Group arrays.

Sorry if there's wrong grammar... :D
 
Level 22
Joined
Aug 27, 2013
Messages
3,973
Review :
  • You forgot to remove location stored in TempPoint and TempPoint2.
  • Store (Picked unit) and use it to check valid units and more.
  • Same goes to (Picked destructable).
  • You don't need to check if the current stage is 1 or 2 again.
  • When the spell is going to change to stage 2, remove the location in TempPoint and TempPoint2 first.

Suggestions :
  • Make attack-type and damage-type configurable.
  • Store the (Order(harvest)) into a variable with type Order.
  • To pick nearby units, use "Custom script: set bj_wantDestroyGroup = true" instead. If you still want to use the current way, you don't need to make the DSB_Damage_Group arrays.

Sorry if there's wrong grammar... :D

what about the picked unit? i store them already :\

Make attack-type and damage-type configurable.
that's not really important

Store the (Order(harvest)) into a variable with type Order.
to make it configurable? no i won't
if someone change the order, it will messed up

To pick nearby units, use "Custom script: set bj_wantDestroyGroup = true" instead. If you still want to use the current way, you don't need to make the DSB_Damage_Group arrays.
why is that?
 
Make attack-type and damage-type configurable.
that's not really important
It's a good addition you know :)

Store the (Order(harvest)) into a variable with type Order.
NO! That's just ridiculous, if you edit the order, everything are messed up.

SUGGESTIONS
OPTIONAL
I recommend an IsDestTree (preferably Almia's Vjass Version(Unless you intend this for normal WE spell)) as it will use less triggers.
 
also, what Ofel said needs to be done :

1. You forgot to remove location stored in TempPoint and TempPoint2.
2. Store (Picked unit) and use it to check valid units and more.
4. You don't need to check if the current stage is 1 or 2 again.
5. When the spell is going to change to stage 2, remove the location in TempPoint and TempPoint2 first.

remember, A Location will Leaks Once you change their reference
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
Anyway, There;s a slightly not MUI in this spell because when it cast RAPIDLY it causes a dummy not returning to the caster and the dummyIllusion is not spawning correctly. Properly your spell is Not MUI :((((
 
Level 13
Joined
Mar 29, 2012
Messages
530
Store the (Order(harvest)) into a variable with type Order.

It's just a suggestion...and i don't meant to be configurable...
the function of it is :
JASS:
String2OrderIdBJ

which contain :

JASS:
function String2OrderIdBJ takes string orderIdString returns integer
    local integer orderId
    
    // Check to see if it's a generic order.
    set orderId = OrderId(orderIdString)
    if (orderId != 0) then
        return orderId
    endif

    // Check to see if it's a (train) unit order.
    set orderId = UnitId(orderIdString)
    if (orderId != 0) then
        return orderId
    endif

    // Unrecognized - return 0
    return 0
endfunction

You can make it with custom script to make it more unreadable...
  • Custom script: set udg_DSB_HarvestOrder = String2OrderIdBJ("harvest")
Edit
I got another problem that may can cause nearby units damaged more than once...

This :
  • Custom script: set udg_DSB_UnDamage_Group[udg_DSB_Max_Index]
Should be :
  • Custom script: set udg_DSB_UnDamage_Group[udg_DSB_Current_Index]
 
Last edited:
Level 29
Joined
Oct 24, 2012
Messages
6,543
Store picked unit before the ITE and use the variable in the conditions.
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • ((Picked unit) belongs to an enemy of DSB_Owner[DSB_Current_Index]) Equal to DSB_Conditions[1]
  • ((Picked unit) is alive) Equal to DSB_Conditions[2]
  • ((Picked unit) is Magic Immune) Equal to DSB_Conditions[3]
  • ((Picked unit) is A structure) Equal to DSB_Conditions[4]
  • ((Picked unit) is in DSB_UnDamage_Group[DSB_Current_Index]) Equal to DSB_Conditions[5]
  • Then - Actions
  • Set TempUnit = (Picked unit)
TempPoint and TempPoint2 leak in your cast trigger.

Move your turn off ITE in the loop trigger into the de-indexing portion of the spell.

This seems pointless ? Set DSB_Stage[DSB_Max_Index] = 1

You never de-index the ability lvl. Everything you index has to be de-indexed.
 
Level 22
Joined
Aug 27, 2013
Messages
3,973
now, i understand what you meant
explaination:
at the loop trigger (now the stage = 1) check if the stage is 1 then do actions
when the stage 1 is finish, change the stage to 2 (now the stage = 2)
when the stage 2 is finish, i turn off the trigger
so if an unit want to cast the spell again i change it to 1 again, though if it is pointless i will remove it
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
now, i understand what you meant
explaination:
at the loop trigger (now the stage = 1) check if the stage is 1 then do actions
when the stage 1 is finish, change the stage to 2 (now the stage = 2)
when the stage 2 is finish, i turn off the trigger
so if an unit want to cast the spell again i change it to 1 again, though if it is pointless i will remove it

I don't know what dimf said or pointing it out xD...
 
Top