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

need help with spell

Status
Not open for further replies.
Level 11
Joined
Jul 17, 2013
Messages
544
Sam catches target with his rope, stunning him and making connection between them. During that time Sam can't attack, but can move. Every time non-target enemy gets touched by that connection, they take damage


This is my spell idea, it seems bit complained, i tired to look something similar in the hive workshop spells but i didnt find anything, i only found beam systems but i dont know how to damage units who step at beam.

does anyone know a spell from hive workshop spell section that will be similar to my idea?

if not then how would you create this ability?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,576
The Disarm would be managed by adding the Cargo Hold (Orc Burrow) ability to Sam.
The stun could be used with a Dummy unit casting Aerial Shackles on the enemy. This could also be used to make the "rope" effect.
You can then use this system for the damage beam: Line Segment Enumeration v2.2a (vJass, Lua, GUI)

Edit:
I made the spell using the methods I described above. Here are the triggers:
  • Cast Rope
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Rope
    • Actions
      • Set VariableSet Sam = (Triggering unit)
      • Set VariableSet RopeTarget = (Target unit of ability being cast)
      • Unit - Add Disarm (Rope) to Sam
      • -------- --------
      • -------- Dummy stuff: --------
      • Set VariableSet RopePoint = (Position of Sam)
      • Unit - Create 1 Dummy for (Triggering player) at RopePoint facing Default building facing degrees
      • Custom script: call RemoveLocation (udg_RopePoint)
      • Set VariableSet RopeDummy = (Last created unit)
      • Unit - Add a 5.00 second Generic expiration timer to RopeDummy
      • Unit - Add Rope (Dummy) to RopeDummy
      • Unit - Order RopeDummy to Human Dragonhawk Rider - Aerial Shackles RopeTarget
      • -------- --------
      • Countdown Timer - Start RopeTimer as a Repeating timer that will expire in 0.04 seconds
  • Rope Periodic
    • Events
      • Time - RopeTimer expires
    • Conditions
    • Actions
      • -------- This Timer runs once every 0.04 seconds. --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Sam is alive) Equal to True
          • (RopeTarget is alive) Equal to True
          • (RopeDummy is alive) Equal to True
        • Then - Actions
          • -------- Move the Rope Dummy to Sam's position: --------
          • Custom script: call SetUnitX(udg_RopeDummy, GetUnitX(udg_Sam))
          • Custom script: call SetUnitY(udg_RopeDummy, GetUnitY(udg_Sam))
          • -------- --------
          • -------- Check every 0.20 seconds for units that can be damaged: --------
          • Set VariableSet RopeCounter = (RopeCounter + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RopeCounter Equal to 5
            • Then - Actions
              • Set VariableSet RopeCounter = 0
              • -------- --------
              • -------- Get units standing in the rope and damage them: --------
              • Set VariableSet LSE_Offset = 100.00
              • Set VariableSet LSE_Loc_1 = (Position of Sam)
              • Set VariableSet LSE_Loc_2 = (Position of RopeTarget)
              • Trigger - Run LSE_GetUnits (ignoring conditions)
              • Unit Group - Pick every unit in LSE_Group and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Picked unit) Not equal to RopeTarget
                      • ((Picked unit) belongs to an enemy of (Owner of Sam).) Equal to True
                      • ((Picked unit) is alive) Equal to True
                      • ((Picked unit) is invulnerable) Equal to False
                      • ((Picked unit) is hidden) Equal to False
                    • Then - Actions
                      • Unit - Cause Sam to damage (Picked unit), dealing 20.00 damage of attack type Spells and damage type Normal
                    • Else - Actions
              • Unit Group - Remove all units from LSE_Group.
              • Custom script: call RemoveLocation(udg_LSE_Loc_1)
              • Custom script: call RemoveLocation(udg_LSE_Loc_2)
            • Else - Actions
        • Else - Actions
          • Countdown Timer - Pause RopeTimer
          • Set VariableSet RopeCounter = 0
          • Unit - Remove Disarm (Rope) from Sam
The visuals only work properly in SD graphics. Currently it deals 100 damage per second (20 dmg every 0.20 seconds) and lasts 5 seconds. Change the Expiration Timer on the Dummy to change the Duration. You can change the Area of Effect of the rope using the LSE_Offset variable in the Rope Periodic trigger. The LSE_ variables come from the Line Segment Enumeration system I linked.
The attached map requires the latest patch (1.32+).
 

Attachments

  • Rope Example.w3m
    29.6 KB · Views: 11
Last edited:
Level 11
Joined
Jul 17, 2013
Messages
544
The Disarm would be managed by adding the Cargo Hold (Orc Burrow) ability to Sam.
The stun could be used with a Dummy unit casting Aerial Shackles on the enemy. This could also be used to make the "rope" effect.
You can then use this system for the damage beam: Line Segment Enumeration v2.2a (vJass, Lua, GUI)

Edit:
I made the spell using the methods I described above. Here are the triggers:
  • Cast Rope
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Rope
    • Actions
      • Set VariableSet Sam = (Triggering unit)
      • Set VariableSet RopeTarget = (Target unit of ability being cast)
      • Unit - Add Disarm (Rope) to Sam
      • -------- --------
      • -------- Dummy stuff: --------
      • Set VariableSet RopePoint = (Position of Sam)
      • Unit - Create 1 Dummy for (Triggering player) at RopePoint facing Default building facing degrees
      • Custom script: call RemoveLocation (udg_RopePoint)
      • Set VariableSet RopeDummy = (Last created unit)
      • Unit - Add a 5.00 second Generic expiration timer to RopeDummy
      • Unit - Add Rope (Dummy) to RopeDummy
      • Unit - Order RopeDummy to Human Dragonhawk Rider - Aerial Shackles RopeTarget
      • -------- --------
      • Countdown Timer - Start RopeTimer as a Repeating timer that will expire in 0.04 seconds
  • Rope Periodic
    • Events
      • Time - RopeTimer expires
    • Conditions
    • Actions
      • -------- This Timer runs once every 0.04 seconds. --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Sam is alive) Equal to True
          • (RopeTarget is alive) Equal to True
          • (RopeDummy is alive) Equal to True
        • Then - Actions
          • -------- Move the Rope Dummy to Sam's position: --------
          • Custom script: call SetUnitX(udg_RopeDummy, GetUnitX(udg_Sam))
          • Custom script: call SetUnitY(udg_RopeDummy, GetUnitY(udg_Sam))
          • -------- --------
          • -------- Check every 0.20 seconds for units that can be damaged: --------
          • Set VariableSet RopeCounter = (RopeCounter + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RopeCounter Equal to 5
            • Then - Actions
              • Set VariableSet RopeCounter = 0
              • -------- --------
              • -------- Get units standing in the rope and damage them: --------
              • Set VariableSet LSE_Offset = 100.00
              • Set VariableSet LSE_Loc_1 = (Position of Sam)
              • Set VariableSet LSE_Loc_2 = (Position of RopeTarget)
              • Trigger - Run LSE_GetUnits (ignoring conditions)
              • Unit Group - Pick every unit in LSE_Group and do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Picked unit) Not equal to RopeTarget
                      • ((Picked unit) belongs to an enemy of (Owner of Sam).) Equal to True
                      • ((Picked unit) is alive) Equal to True
                      • ((Picked unit) is invulnerable) Equal to False
                      • ((Picked unit) is hidden) Equal to False
                    • Then - Actions
                      • Unit - Cause Sam to damage (Picked unit), dealing 20.00 damage of attack type Spells and damage type Normal
                    • Else - Actions
              • Unit Group - Remove all units from LSE_Group.
              • Custom script: call RemoveLocation(udg_LSE_Loc_1)
              • Custom script: call RemoveLocation(udg_LSE_Loc_2)
            • Else - Actions
        • Else - Actions
          • Countdown Timer - Pause RopeTimer
          • Set VariableSet RopeCounter = 0
          • Unit - Remove Disarm (Rope) from Sam
The visuals only work properly in SD graphics. Currently it deals 100 damage per second (20 dmg every 0.20 seconds) and lasts 5 seconds. Change the Expiration Timer on the Dummy to change the Duration. You can change the Area of Effect of the rope using the LSE_Offset variable in the Rope Periodic trigger. The LSE_ variables come from the Line Segment Enumeration system I linked.
The attached map requires the latest patch (1.32+).
ok ty very much, reday map was very usefull for me, spell like that seem really difficult for me, or spells like knockback aswell. i forgot to tell you i improved i am able to do more of custom spells myslef. btw next time when i will need a reday map i think i will mention it in post.

i am thinking of more one thing, breaking the rope if sam moved too far away from target, i think i need to check distance beetwen sam and rope target every 0.2 seconds? in the loop trigger and add the condition distance beetwen sam and target less than X
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,576
No problem, and yes you would need to compare the distance between Sam and RopeTarget (the target). You could do this every 0.2 seconds or every 0.04 seconds (the timer actually runs every 0.04 seconds but I use that RopeCounter variable to count every 0.20 seconds). It's probably good to do it every 0.2 seconds though since it will perform better and still work just fine.

Something like:
Set Variable SamPos = Position of Sam
Set Variable RopePos = Position of RopeTarget
If Distance between SamPos and RopePos Greater than or equal to X then Pause RopeTimer/Remove RopeDummy/Remove Disarm.

Don't forget to remove the 2 points so they don't leak.
 
Status
Not open for further replies.
Top