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.

Demon's Swap v0.03b

Submitted by BUP
This bundle is marked as approved. It works and satisfies the submission rules.
Demon's Swap [W]
Magically swap the position of the caster and the target.Not instantly but spinning around the mid-point and change the positions.

Level 1 - Cast Range 800.
Level 2 - Cast Range 1000.
Level 3 - Cast Range 1200.
Cooldown - 3 seconds.

**v0.03Triggers**
DeS Config

  • DeS Config
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- -------------------------CONFIGURATION START----------------------------------- --------
      • -------- ------------------------------------------------------------ --------
      • -------- Is the caster alive?? --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Condition_Config[0] = True
      • -------- ------------------------------------------------------------ --------
      • -------- Is the target alive?? --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Condition_Config[1] = True
      • -------- ------------------------------------------------------------ --------
      • -------- The distance dividing integer --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Middle_Distance_Divider = 2
      • -------- ------------------------------------------------------------ --------
      • -------- The speed of swapping places --------
      • -------- The speed number should be even --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Swap_Speed = 16.00
      • -------- ------------------------------------------------------------ --------
      • -------- The size of the effect in precentage 100% is normal --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Middle_Effect_Size = 500.00
      • -------- ------------------------------------------------------------ --------
      • -------- The time of the effect stay --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Middle_Effect_Timer = 2.00
      • -------- ------------------------------------------------------------ --------
      • -------- The attachment of the special effect on the caster --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Attachment_1 = chest
      • -------- ------------------------------------------------------------ --------
      • -------- The attachment of the special effect on the target --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Attachment_2 = chest
      • -------- ------------------------------------------------------------ --------
      • -------- The attachment of the special effect on the middle unit --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Attachment_3 = origin
      • -------- ------------------------------------------------------------ --------
      • -------- The model file of the special effect on caster --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Effect_Model_1 = Abilities\Weapons\SeaElementalMissile\SeaElementalMissile.mdl
      • -------- ------------------------------------------------------------ --------
      • -------- The model file of the special effect on target --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Effect_Model_2 = Abilities\Weapons\WaterElementalMissile\WaterElementalMissile.mdl
      • -------- ------------------------------------------------------------ --------
      • -------- The model file of the special effect on middle unit --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Effect_Model_3 = Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
      • -------- ------------------------------------------------------------ --------
      • -------- Sets the Ability variable, which reduces time when copying this spell into ur map --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Spell = Demon's Swap
      • -------- ------------------------------------------------------------ --------
      • -------- Sets the Unit-Type variable, which reduces time when copying this spell into ur map --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Dummy_Type = Dummy
      • -------- -------------------------CONFIGURATION END----------------------------------- --------


DeS Cast

  • DeS Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to DeS_Spell
    • Actions
      • -------- ------------------------------------------------------------ --------
      • -------- IMPORTANT SYSTEM START --------
      • -------- ------------------------------------------------------------ --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DeS_Index_Listener Equal to 0
        • Then - Actions
          • Trigger - Turn on DeS Loop <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DeS_Recycle_Size Greater than 0
        • Then - Actions
          • Set DeS_Recycle_Size = (DeS_Recycle_Size - 1)
          • Set DeS_Current_Index = DeS_Recycle_Container[DeS_Recycle_Size]
        • Else - Actions
          • Set DeS_Current_Index = DeS_Index_Size
          • Set DeS_Index_Size = (DeS_Index_Size + 1)
      • -------- ------------------------------------------------------------ --------
      • -------- IMPORTANT SYSTEM END --------
      • -------- ------------------------------------------------------------ --------
      • -------- Sets the stage to be 0 which is reused in the Loop TRIGGER --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Stage[DeS_Current_Index] = 0
      • -------- ------------------------------------------------------------ --------
      • -------- Sets the caster for its current index --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Caster[DeS_Current_Index] = (Triggering unit)
      • -------- ------------------------------------------------------------ --------
      • -------- Sets the target for its current index --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Target[DeS_Current_Index] = (Target unit of ability being cast)
      • -------- ------------------------------------------------------------ --------
      • -------- Sets the position/point of the caster --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Caster_Point = (Position of DeS_Caster[DeS_Current_Index])
      • -------- ------------------------------------------------------------ --------
      • -------- Sets the position/point of the target --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Target_Point = (Position of DeS_Target[DeS_Current_Index])
      • -------- ------------------------------------------------------------ --------
      • -------- Sets the position/point of the caster again as a start point --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Start_Point[DeS_Current_Index] = (Position of DeS_Caster[DeS_Current_Index])
      • -------- ------------------------------------------------------------ --------
      • -------- Sets the position/point of the target again as an end point --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_End_Point[DeS_Current_Index] = (Position of DeS_Target[DeS_Current_Index])
      • -------- ------------------------------------------------------------ --------
      • -------- Sets the middle distance between the two units (caster and target) --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Middle_Distance[DeS_Current_Index] = ((Distance between DeS_Caster_Point and DeS_Target_Point) / (Real(DeS_Middle_Distance_Divider)))
      • -------- ------------------------------------------------------------ --------
      • -------- Sets the middle point at the middle distance set before --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Middle_Point[DeS_Current_Index] = (DeS_Caster_Point offset by DeS_Middle_Distance[DeS_Current_Index] towards (Angle from DeS_Caster_Point to DeS_Target_Point) degrees)
      • -------- ------------------------------------------------------------ --------
      • -------- Creates a dummy at the middle point set before to use as a point with offset and store the dummy into a variable --------
      • -------- ------------------------------------------------------------ --------
      • Unit - Create 1 DeS_Dummy_Type for (Owner of DeS_Caster[DeS_Current_Index]) at DeS_Middle_Point[DeS_Current_Index] facing Default building facing degrees
      • Set DeS_Middle_Unit[DeS_Current_Index] = (Last created unit)
      • -------- ------------------------------------------------------------ --------
      • -------- Change the effect size --------
      • -------- ------------------------------------------------------------ --------
      • Animation - Change DeS_Middle_Unit[DeS_Current_Index]'s size to (DeS_Middle_Effect_Size%, 0.00%, 0.00%) of its original size
      • -------- ------------------------------------------------------------ --------
      • -------- Adds expiration timer for the effect --------
      • -------- ------------------------------------------------------------ --------
      • Unit - Add a DeS_Middle_Effect_Timer second Generic expiration timer to DeS_Middle_Unit[DeS_Current_Index]
      • -------- ------------------------------------------------------------ --------
      • -------- Creates special effects and stores the created special effects into variables --------
      • -------- ------------------------------------------------------------ --------
      • Special Effect - Create a special effect attached to the DeS_Attachment_1 of DeS_Caster[DeS_Current_Index] using DeS_Effect_Model_1
      • Set DeS_Special_Effect_1[DeS_Current_Index] = (Last created special effect)
      • Special Effect - Create a special effect attached to the DeS_Attachment_2 of DeS_Target[DeS_Current_Index] using DeS_Effect_Model_2
      • Set DeS_Special_Effect_2[DeS_Current_Index] = (Last created special effect)
      • Special Effect - Create a special effect attached to the DeS_Attachment_3 of DeS_Middle_Unit[DeS_Current_Index] using DeS_Effect_Model_3
      • Special Effect - Destroy (Last created special effect)
      • -------- ------------------------------------------------------------ --------
      • -------- Turns the collision off for the caster and target --------
      • -------- ------------------------------------------------------------ --------
      • Unit - Turn collision for DeS_Caster[DeS_Current_Index] Off
      • Unit - Turn collision for DeS_Target[DeS_Current_Index] Off
      • -------- ------------------------------------------------------------ --------
      • -------- Removes the location LEAKS --------
      • -------- ------------------------------------------------------------ --------
      • Custom script: call RemoveLocation(udg_DeS_Caster_Point)
      • Custom script: call RemoveLocation(udg_DeS_Target_Point)
      • -------- ------------------------------------------------------------ --------
      • -------- Pause the target and the caster --------
      • -------- ------------------------------------------------------------ --------
      • Custom script: call PauseUnit(udg_DeS_Caster[udg_DeS_Current_Index], true)
      • Custom script: call PauseUnit(udg_DeS_Target[udg_DeS_Current_Index], true)
      • -------- ------------------------------------------------------------ --------
      • -------- IMPORTANT SYSTEM START --------
      • -------- ------------------------------------------------------------ --------
      • Set DeS_Index_Container[DeS_Index_Listener] = DeS_Current_Index
      • Set DeS_Index_Listener = (DeS_Index_Listener + 1)
      • -------- ------------------------------------------------------------ --------
      • -------- IMPORTANT SYSTEM END --------
      • -------- ------------------------------------------------------------ --------


DeS Loop

  • DeS Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- ------------------------------------------------------------ --------
      • -------- IMPORTANT SYSTEM START --------
      • -------- ------------------------------------------------------------ --------
      • For each (Integer DeS_Loop) from 0 to (DeS_Index_Listener - 1), do (Actions)
        • Loop - Actions
          • Set DeS_Current_Index = DeS_Index_Container[DeS_Loop]
          • -------- ------------------------------------------------------------ --------
          • -------- IMPORTANT SYSTEM END --------
          • -------- ------------------------------------------------------------ --------
          • -------- MAIN CONDITION --------
          • -------- ------------------------------------------------------------ --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (DeS_Caster[DeS_Current_Index] is alive) Equal to DeS_Condition_Config[0]
              • (DeS_Target[DeS_Current_Index] is alive) Equal to DeS_Condition_Config[1]
              • DeS_Stage[DeS_Current_Index] Equal to 0
            • Then - Actions
              • -------- ------------------------------------------------------------ --------
              • -------- Sets the position/point of the caster --------
              • -------- ------------------------------------------------------------ --------
              • Set DeS_Caster_Point = (Position of DeS_Caster[DeS_Current_Index])
              • -------- ------------------------------------------------------------ --------
              • -------- Sets the position/point of the target --------
              • -------- ------------------------------------------------------------ --------
              • Set DeS_Target_Point = (Position of DeS_Target[DeS_Current_Index])
              • -------- ------------------------------------------------------------ --------
              • -------- If the caster is near to the end point (or) If the target is near to the start point --------
              • -------- ------------------------------------------------------------ --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between DeS_Caster_Point and DeS_End_Point[DeS_Current_Index]) Less than or equal to 50.00
                  • (Distance between DeS_Target_Point and DeS_Start_Point[DeS_Current_Index]) Less than or equal to 50.00
                • Then - Actions
                  • -------- ------------------------------------------------------------ --------
                  • -------- Then sets the DeS_Stage= 1.So in the next loop the main condition will return false and run the else actions --------
                  • -------- ------------------------------------------------------------ --------
                  • Set DeS_Stage[DeS_Current_Index] = 1
                • Else - Actions
                  • -------- ------------------------------------------------------------ --------
                  • -------- Sets the increased angle from the middle point to the caster point.****Note**** Change the "+" to "-" to change the direction of swapping --------
                  • -------- ------------------------------------------------------------ --------
                  • Set DeS_Angle_1 = ((Angle from DeS_Middle_Point[DeS_Current_Index] to DeS_Caster_Point) + DeS_Swap_Speed)
                  • -------- ------------------------------------------------------------ --------
                  • -------- If the increased angle is greater than or eqaul to 359 ?? --------
                  • -------- ------------------------------------------------------------ --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • DeS_Angle_1 Greater than or equal to 359.00
                    • Then - Actions
                      • -------- ------------------------------------------------------------ --------
                      • -------- then it sets the angle to 0 degree --------
                      • -------- ------------------------------------------------------------ --------
                      • Set DeS_Angle_1 = 0.00
                    • Else - Actions
                  • -------- ------------------------------------------------------------ --------
                  • -------- Moves the caster around the middle unit --------
                  • -------- ------------------------------------------------------------ --------
                  • Custom script: call SetUnitX(udg_DeS_Caster[udg_DeS_Current_Index],GetUnitX(udg_DeS_Middle_Unit[udg_DeS_Current_Index]) + udg_DeS_Middle_Distance[udg_DeS_Current_Index] * Cos(udg_DeS_Angle_1 * bj_DEGTORAD))
                  • Custom script: call SetUnitY(udg_DeS_Caster[udg_DeS_Current_Index],GetUnitY(udg_DeS_Middle_Unit[udg_DeS_Current_Index]) + udg_DeS_Middle_Distance[udg_DeS_Current_Index] * Sin(udg_DeS_Angle_1 * bj_DEGTORAD))
                  • -------- ------------------------------------------------------------ --------
                  • -------- Sets the increased angle from the middle point to the target point.****Note**** Change the "+" to "-" to change the direction of swapping --------
                  • -------- ------------------------------------------------------------ --------
                  • Set DeS_Angle_2 = ((Angle from DeS_Middle_Point[DeS_Current_Index] to DeS_Target_Point) + DeS_Swap_Speed)
                  • -------- ------------------------------------------------------------ --------
                  • -------- If the increased angle is greater than or eqaul to 359 ?? --------
                  • -------- ------------------------------------------------------------ --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • DeS_Angle_2 Greater than or equal to 359.00
                    • Then - Actions
                      • -------- ------------------------------------------------------------ --------
                      • -------- then it sets the angle to 0 degree --------
                      • -------- ------------------------------------------------------------ --------
                      • Set DeS_Angle_2 = 0.00
                    • Else - Actions
                  • -------- ------------------------------------------------------------ --------
                  • -------- Moves the target around the middle unit --------
                  • -------- ------------------------------------------------------------ --------
                  • Custom script: call SetUnitX(udg_DeS_Target[udg_DeS_Current_Index],GetUnitX(udg_DeS_Middle_Unit[udg_DeS_Current_Index]) + udg_DeS_Middle_Distance[udg_DeS_Current_Index] * Cos(udg_DeS_Angle_2 * bj_DEGTORAD))
                  • Custom script: call SetUnitY(udg_DeS_Target[udg_DeS_Current_Index],GetUnitY(udg_DeS_Middle_Unit[udg_DeS_Current_Index]) + udg_DeS_Middle_Distance[udg_DeS_Current_Index] * Sin(udg_DeS_Angle_2 * bj_DEGTORAD))
              • -------- ------------------------------------------------------------ --------
              • -------- Removes the location LEAKS --------
              • -------- ------------------------------------------------------------ --------
              • Custom script: call RemoveLocation(udg_DeS_Caster_Point)
              • Custom script: call RemoveLocation(udg_DeS_Target_Point)
            • Else - Actions
              • -------- ------------------------------------------------------------ --------
              • -------- Unpause the target and the caster --------
              • -------- ------------------------------------------------------------ --------
              • Custom script: call PauseUnit(udg_DeS_Caster[udg_DeS_Current_Index], false)
              • Custom script: call PauseUnit(udg_DeS_Target[udg_DeS_Current_Index], false)
              • -------- ------------------------------------------------------------ --------
              • -------- Turns the collision on for the caster and target --------
              • -------- ------------------------------------------------------------ --------
              • Unit - Turn collision for DeS_Caster[DeS_Current_Index] On
              • Unit - Turn collision for DeS_Target[DeS_Current_Index] On
              • -------- ------------------------------------------------------------ --------
              • -------- Destroy the stored special effects --------
              • -------- ------------------------------------------------------------ --------
              • Special Effect - Destroy DeS_Special_Effect_1[DeS_Current_Index]
              • Special Effect - Destroy DeS_Special_Effect_2[DeS_Current_Index]
              • -------- ------------------------------------------------------------ --------
              • -------- Remove the location LEAKS --------
              • -------- ------------------------------------------------------------ --------
              • Custom script: call RemoveLocation(udg_DeS_Middle_Point[udg_DeS_Current_Index])
              • Custom script: call RemoveLocation(udg_DeS_Start_Point[udg_DeS_Current_Index])
              • Custom script: call RemoveLocation(udg_DeS_End_Point[udg_DeS_Current_Index])
              • -------- ------------------------------------------------------------ --------
              • -------- IMPORTANT SYSTEM START --------
              • -------- ------------------------------------------------------------ --------
              • Set DeS_Index_Listener = (DeS_Index_Listener - 1)
              • Set DeS_Index_Container[DeS_Loop] = DeS_Index_Container[DeS_Index_Listener]
              • Set DeS_Recycle_Container[DeS_Current_Index] = DeS_Current_Index
              • Set DeS_Recycle_Size = (DeS_Recycle_Size + 1)
              • Set DeS_Loop = (DeS_Loop - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DeS_Index_Listener Equal to 0
                • Then - Actions
                  • Trigger - Turn off DeS Loop <gen>
                • Else - Actions
              • -------- ------------------------------------------------------------ --------
              • -------- IMPORTANT SYSTEM END --------
              • -------- ------------------------------------------------------------ --------


DeS Remover

  • DeS Remover
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Dummy
    • Actions
      • -------- ------------------------------------------------------------ --------
      • -------- Removes the dummy immediately upon death --------
      • -------- ------------------------------------------------------------ --------
      • Unit - Remove (Triggering unit) from the game


Changelog

====================================================================================
V0.01 Uploaded Here
====================================================================================
V0.02 Fixed to MUI
====================================================================================
V0.03a Fixed the LEAKS,added documentation,a new feature with middle unit effect and it's no longer able to cast on friendly units
====================================================================================
V0.03b Fixed the special effect leak
====================================================================================

v0.03 Screenshot

[​IMG]

Credits

Credits to Magtheridon96:
For taking a look to my spell and telling me the right things to do.
Credits to doomhammer99:
For your advice and spell rating system


Keywords:
Swapping,Moving,Simple,Cool Effects,Two Units,MUI,GUI,TRIGGER
Contents

Demon's Swap v0.03 (Map)

Reviews
Moderator
11:52, 18th Nov 2012 Magtheridon96: Approved. Splendid work. Configuration is good, comments are abundant, and the code is okay.
  1. 11:52, 18th Nov 2012
    Magtheridon96: Approved.
    Splendid work. Configuration is good, comments are abundant, and the code is okay.
     
  2. gorillabull

    gorillabull

    Joined:
    Jul 17, 2011
    Messages:
    1,365
    Resources:
    2
    Spells:
    2
    Resources:
    2
    cool effect
     
  3. RakEnRoL

    RakEnRoL

    Joined:
    Sep 2, 2011
    Messages:
    316
    Resources:
    0
    Resources:
    0
    Nicely done.
     
  4. doomhammer99

    doomhammer99

    Joined:
    Dec 5, 2011
    Messages:
    319
    Resources:
    5
    Models:
    1
    Spells:
    3
    Tutorials:
    1
    Resources:
    5
    Spell Resource Rating System by doomhammer99
    Note: 5 is the highest point that can be given, and 1 is the lowest
    Documentation: 4
    Triggering: 5
    Idea: 5
    Usefulness: 4
    Overall Aspects: 4

    Overall Rating: 4.4Rating Changed
    Rating Comment: Recommended
    My Comment: Congratulations. :D
     
    Last edited: Nov 27, 2012
  5. RakEnRoL

    RakEnRoL

    Joined:
    Sep 2, 2011
    Messages:
    316
    Resources:
    0
    Resources:
    0
    Tested it. And it seems that it isn't MUI because it bugs. Try casting it at the same time. Or try this

    Spellcaster#1 - casts to -> Ogre
    then
    Specaster#2 - casts to -> Spellcaster#1

    You will see funny stuff.
     
  6. BUP

    BUP

    Joined:
    Sep 9, 2012
    Messages:
    149
    Resources:
    8
    Spells:
    8
    Resources:
    8
    Thanks doom for giving me 4.4!! :ogre_hurrhurr: and also for your congratulating me..:ogre_haosis:
     
  7. doomhammer99

    doomhammer99

    Joined:
    Dec 5, 2011
    Messages:
    319
    Resources:
    5
    Models:
    1
    Spells:
    3
    Tutorials:
    1
    Resources:
    5
    Nah :D Keep up