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

[Solved] Deadly plumage

Status
Not open for further replies.
Level 9
Joined
Dec 16, 2017
Messages
339
Hello guys, i am trying to make a spell pretty much like deadly plumage from mystic, Deadly Plumage (1.32)
But i have no clue on how to trigger it...is there any tutorial i can find?
I need it to detect how many enemies are in [500] aoe of the caster and shot them an arrow that deals damage, if there are 2 enemies, send 1 arrow to each of them, if there are 8 enemies, also send 1 arrow to each of them, and also on higher levels, i would to send 2 arrows to one enemy , if they are 2 enemies, to send 2 arrows to each of them..
Thanks in advance !
 
Last edited:
Level 24
Joined
Feb 9, 2009
Messages
1,783
Initially this would just be fan of knifes.
For additional projectiles just get a dummy unit to cast it at a delay of your choice.

I'm sure I have something closely related to this, one moment.

Tutorial on dummies

Edit:
So i'm not entirely confident in locals just yet, but testing results in success.
@Uncle has more experience with locals than me and can possibly provide a better solution.

  • Deadly Plumage
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Definitely (Not) Fan of Knives
      • (Level of (Ability being cast) for (Triggering unit)) Greater than 1
    • Actions
      • Custom script: local integer udg_Counter
      • For each (Integer Counter) from 1 to ((Level of (Ability being cast) for (Triggering unit)) - 1), do (Actions)
        • Loop - Actions
          • Wait 1.50 seconds
          • Set VariableSet FRee_A_Point[0] = (Position of (Triggering unit))
          • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at FRee_A_Point[0] facing Default building facing degrees
          • Unit - Add Dummy -Fan of Knives to (Last created unit)
          • Unit - Order (Last created unit) to Night Elf Warden - Fan Of Knives.
          • Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation(udg_FRee_A_Point[0])
      • Custom script: set udg_Counter = 0
 
Last edited:
Level 9
Joined
Dec 16, 2017
Messages
339
I've done it like this, but my next question is how can i make the dummy cast it multiple times?
For level 1 do 1 cast, level 2 do 2 casts and so on until level 4..
I'm using patch 1.28.5 WE.

  • Multishot
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Multishot (Hunter MARKSMANSHIP)
    • Actions
      • Unit Group - Pick every unit in (Units within (300.00 + (100.00 x (Real((Level of Multishot (Hunter MARKSMANSHIP) for (Triggering unit)))))) of (Position of (Triggering unit)) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Mechanical) Equal to False) a and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy Empty for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing 0.00 degrees
          • Unit - Add |r (Multishot Dummy) to (Last created unit)
          • Unit - Set level of |r (Multishot Dummy) for (Last created unit) to (Level of Multishot (Hunter MARKSMANSHIP) for (Triggering unit))
          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)

Later edit:
Now i've seen your post, so i made something like this


  • Multishot
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Multishot (Hunter MARKSMANSHIP)
      • (Level of (Ability being cast) for (Triggering unit)) Greater than 1
    • Actions
      • Custom script: local integer udg_Counter
      • Unit Group - Pick every unit in (Units within (300.00 + (100.00 x (Real((Level of Multishot (Hunter MARKSMANSHIP) for (Triggering unit)))))) of (Position of (Triggering unit)) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Mechanical) Equal to False) a and do (Actions)
        • Loop - Actions
          • For each (Integer Counter) from 1 to (Level of (Ability being cast) for (Triggering unit)), do (Actions)
            • Loop - Actions
              • Unit - Create 1 Dummy Empty for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing 0.00 degrees
              • Unit - Add |r (Multishot Dummy) to (Last created unit)
              • Unit - Set level of |r (Multishot Dummy) for (Last created unit) to (Level of Multishot (Hunter MARKSMANSHIP) for (Triggering unit))
              • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
              • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
      • Custom script: set udg_Counter = 0
But, isn't the wait in a loop messing up the trigger? How can i set the timer to be with something else?
 
Last edited:
Level 24
Joined
Feb 9, 2009
Messages
1,783
Now this is an entirely different direction from what I was proposing.
Remove the custom script since it serves no purpose in your current rendition.

Ensure you've read this tutorial I posted in the first post, as well as this tutorial on leaks, and lastly this short and sweet tutorial on unit group filtering.
Lastly you will need to use variables to refer to units before starting a "Pick every unit in ..." due to the reference being lost.

A working version of your trigger save for the delay would be:
  • Cast Copy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fan of Knives
      • (Level of (Ability being cast) for (Triggering unit)) Greater than 1
    • Actions
      • Set VariableSet Example_A_Point[0] = (Position of (Triggering unit))
      • Set VariableSet Example_A_Unit[0] = (Triggering unit)
      • For each (Integer Example_A_Loop) from 1 to ((Level of Fan of Knives for Example_A_Unit[0]) - 1), do (Actions)
        • Loop - Actions
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units within (300.00 + (100.00 + (Real((Level of Fan of Knives for Example_A_Unit[0]))))) of Example_A_Point[0].) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is A structure) Equal to False
                  • ((Picked unit) is Mechanical) Equal to False
                  • ((Picked unit) is alive) Equal to True
                  • ((Picked unit) belongs to an enemy of (Owner of Example_A_Unit[0]).) Equal to True
                • Then - Actions
                  • Unit - Create 1 dummy for (Owner of Example_A_Unit[0]) at Example_A_Point[0] facing Default building facing degrees
                  • Unit - Add Dummy shot (Neutral Hostile) to (Last created unit)
                  • Unit - Order (Last created unit) to Neutral - Firebolt (Picked unit)
                  • Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
                • Else - Actions
      • Custom script: call RemoveLocation(udg_Example_A_Point[0])
 
Last edited:
Level 9
Joined
Dec 16, 2017
Messages
339
Based of what you posted now, how can i make it cast multiple times like it was before, i can insert again for each integer from 1 to level of ability and after that to pick the units? And also a little timer between each cast of like 0,30 seconds or something like that..
The deadly plumage isn't based of fan of knives, it's an one cast unit spell like storm bolt, because it fires only to enemies that are in area, it doesn't spread plumage arround in an AOE of the caster.
 
Level 24
Joined
Feb 9, 2009
Messages
1,783
The deadly plumage isn't based of fan of knives, it's an one cast unit spell like storm bolt, because it fires only to enemies that are in area, it doesn't spread plumage arround in an AOE of the caster.

I'm sorry what.
Please elaborate why you are choosing storm bolt rather than fan of knives.
If you are talking about the three fans of knives that appear when you cast the base spell:
1637915692563.png

This is simply an effect and does not apply damage.
The demo for the deadly plumage model doesn't have a cast effect so it is abscent from the demo video.
 
Last edited:
Level 9
Joined
Dec 16, 2017
Messages
339
Do you have any clues on how i can add a little delay between the casts? like 0.30 seconds delay between each cast? I can use the wait of 0.30 seconds in that trigger without messing it up?
 
Level 24
Joined
Feb 9, 2009
Messages
1,783
Below are the triggers and the trigger file to import.
Make sure you go into the DePl Init trigger to set the variables for your spell and change the delay and AOE, AOE perLVL to your liking.

Ensure you have backed up your map before importing or just open up a new map to import this trigger file.
To import a trigger file, navigate to Trigger Editor>File>Import Triggers... (As the image highlighted section shows.)
1637955677328.png



  • DePl Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet Example_C_AOE = 300.00
      • Set VariableSet Example_C_AOE_PerLVL = 100.00
      • Set VariableSet Example_C_Delay = 0.50
      • -------- --------
      • -------- WARNING --------
      • -------- THESE ARE REQUIRED FOR THE SPELL TO WORK --------
      • -------- --------
      • -------- CASTING ABILITY FOR THE HERO --------
      • Set VariableSet Example_C_Ability[1] = Fan of Knives
      • -------- CASTING ABILITY FOR THE HERO --------
      • -------- --------
      • -------- DUMMY ABILITY --------
      • Set VariableSet Example_C_Ability[2] = Unknown (A00A)
      • -------- DUMMY ABILITY --------
      • -------- --------
      • -------- DUMMY UNIT TYPE --------
      • Set VariableSet Example_C_Dummy_Type =
      • -------- DUMMY UNIT TYPE --------
      • -------- --------
      • -------- THESE ARE REQUIRED FOR THE SPELL TO WORK --------
      • -------- WARNING --------
      • -------- --------
  • DePl Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Example_C_Ability[1]
      • (Level of Example_C_Ability[1] for (Triggering unit)) Greater than 1
    • Actions
      • Set VariableSet Example_A_Index = (Example_A_Index + 1)
      • Set VariableSet Example_B_Caster[Example_A_Index] = (Triggering unit)
      • Set VariableSet Example_B_Count[Example_A_Index] = ((Level of Example_C_Ability[1] for Example_B_Caster[Example_A_Index]) - 1)
      • -------- --------
      • -------- Change delay in the init trigger --------
      • Set VariableSet Example_B_Delay[Example_A_Index] = Example_C_Delay
      • -------- Change delay in the init trigger --------
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Example_A_Index Equal to 1
        • Then - Actions
          • Trigger - Turn on DePl periodic <gen>
        • Else - Actions
  • DePl periodic
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • For each (Integer Example_A_Loop) from 1 to Example_A_Index, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Example_B_Count[Example_A_Loop] Equal to 0
            • Then - Actions
              • Set VariableSet Example_B_Caster[Example_A_Loop] = Example_B_Caster[Example_A_Index]
              • Set VariableSet Example_B_Count[Example_A_Loop] = Example_B_Count[Example_A_Index]
              • Set VariableSet Example_B_Delay[Example_A_Loop] = Example_B_Delay[Example_A_Index]
              • Set VariableSet Example_A_Loop = (Example_A_Loop - 1)
              • Set VariableSet Example_A_Index = (Example_A_Index - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Example_A_Index Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
              • Set VariableSet Example_B_Delay[Example_A_Loop] = (Example_B_Delay[Example_A_Loop] - 0.10)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Example_B_Delay[Example_A_Loop] Equal to 0.00
                • Then - Actions
                  • Set VariableSet Example_A_Point[0] = (Position of Example_B_Caster[Example_A_Loop])
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Pick every unit in (Units within (Example_C_AOE + (Example_C_AOE_PerLVL + (Real((Level of Example_C_Ability[1] for Example_B_Caster[Example_A_Loop]))))) of Example_A_Point[0].) and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ((Picked unit) is A structure) Equal to False
                          • ((Picked unit) is Mechanical) Equal to False
                          • ((Picked unit) is alive) Equal to True
                          • ((Picked unit) belongs to an enemy of (Owner of Example_B_Caster[Example_A_Loop]).) Equal to True
                        • Then - Actions
                          • Unit - Create 1 Example_C_Dummy_Type for (Owner of Example_B_Caster[Example_A_Loop]) at Example_A_Point[0] facing Default building facing degrees
                          • Unit - Add Example_C_Ability[2] to (Last created unit)
                          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
                          • Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
                        • Else - Actions
                  • Custom script: call RemoveLocation(udg_Example_A_Point[0])
                  • Set VariableSet Example_B_Count[Example_A_Loop] = (Example_B_Count[Example_A_Loop] - 1)
                  • Set VariableSet Example_B_Delay[Example_A_Loop] = Example_C_Delay
                • Else - Actions

tumblr_inline_nxbodjrcxW1qkdogo_500.gifv
 

Attachments

  • DePl triggers.wtg
    8.6 KB · Views: 12

Uncle

Warcraft Moderator
Level 63
Joined
Aug 10, 2018
Messages
6,456
Do you have any clues on how i can add a little delay between the casts? like 0.30 seconds delay between each cast? I can use the wait of 0.30 seconds in that trigger without messing it up?
(Triggering unit) is one of if not the only Event Response which you can safely use after a Wait. So as long as that's the only Event Response being referenced, you're fine.
 
Status
Not open for further replies.
Top