Issuing an order, carrion swarm.

Potatisbil

New Member
Reaction score
6
Greetings!

I'm one of those people who likes making stuff in WE, but never publishes anything. Anywho, regarding my latest "project":
I'm trying to make a spell that, when cast, spawns 9 graves in a circle around the caster (plus a hidden footman as a dummy at each grave), and after all the graves have been spawned, the dummies are supposed to cast carrion swarm at the center of the circle.

For some reason, carrion swarm doesn't work. I've tried with other point-based spells (shockwave for example, but I don't want to use it (the temporary terrain deformation is annoying)), and they all worked fine, so why won't my carrion swarm work? Also, the only thing I really modified on the spells was setting their mana cost to 0, made it a normal spell instead of hero and gave it 1 level instead of 3.

Should probably also point out that I can cast the carrion swarm on the footmen manually, but trigger don't seem to work. Using the latest WC3:TFT version.

Note: this is just a test map that I use, I don't really bother with fixing memory leaks on it (well, not completely at least), so no need to point them out.

Modified to only include the parts that should have any relevance at all to my question:

Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Torment
    • Actions
    • Set Temp_real = 0.00
    • Set Temp_pos = (Position of (Triggering unit))
    • For each (Integer A) from 1 to 9, do (Actions)
      • Loop - Actions
        • Unit - Create 1 Footman for Player 1 (Red) at (Temp_pos offset by 600.00 towards Temp_real degrees) facing Default building facing degrees
        • Unit - Add Torment (carrion dummy) to (Last created unit)
        • Unit Group - Add (Last created unit) to Torment_group
        • Unit - Hide (Last created unit)
        • Set Temp_real = (Temp_real + 40.00)
        • Wait ((Distance between (Position of (Last created unit)) and (Temp_pos offset by 600.00 towards (Temp_real + 40.00) degrees)) / 1100.00) seconds
    • Unit Group - Pick every unit in Torment_group and do (Actions)
      • Loop - Actions
        • Unit - Order (Picked unit) to Undead Dreadlord - Carrion Swarm Temp_pos


Unmodified version:
Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Torment
    • Actions
      • Set Temp_real = 0.00
      • Set Temp_pos = (Position of (Triggering unit))
      • For each (Integer A) from 1 to 9, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Spirit (Torment Dummy) for Player 1 (Red) at (Temp_pos offset by 600.00 towards Temp_real degrees) facing Temp_real degrees
          • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Undead\Darksummoning\DarkSummonTarget.mdl
          • Set Torment_FX[(Integer A)] = (Last created special effect)
          • Unit Group - Add (Last created unit) to Torment_group
          • Unit - Turn collision for (Last created unit) Off
          • Unit - Order (Last created unit) to Attack Ground (Temp_pos offset by 600.00 towards (Temp_real + 40.00) degrees)
          • Unit - Create 1 Footman for Player 1 (Red) at (Temp_pos offset by 600.00 towards Temp_real degrees) facing Default building facing degrees
          • Unit - Add Torment (carrion dummy) to (Last created unit)
          • Unit Group - Add (Last created unit) to Torment_group
          • Unit - Hide (Last created unit)
          • Set Temp_real = (Temp_real + 40.00)
          • Wait ((Distance between (Position of (Last created unit)) and (Temp_pos offset by 600.00 towards (Temp_real + 40.00) degrees)) / 1100.00) seconds
      • Unit Group - Pick every unit in Torment_group and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Undead Dreadlord - Carrion Swarm Temp_pos
      • Wait 1.50 game-time seconds
      • For each (Integer A) from 1 to 9, do (Actions)
        • Loop - Actions
          • Special Effect - Destroy Torment_FX[(Integer A)]
      • Unit Group - Pick every unit in Torment_group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Not equal to Footman
            • Then - Actions
              • Unit - Remove (Picked unit) from the game
              • Special Effect - Create a special effect at (Position of (Picked unit)) using Objects\Spawnmodels\Undead\UCancelDeath\UCancelDeath.mdl
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
              • Unit - Remove (Picked unit) from the game
 

Tyman2007

Ya Rly >.
Reaction score
74
A unit does not have to have a model or look like anything in order to cast spells, it just must be on the map.

Try getting rid of Unit - Hide (Last Created Unit) and see if it works then. Also it's key that the spell "Carrion Swarm" has a high enough range, and i'm not sure if it matters if it's a hero ability or not. You can try both ways. If the Unit - Hide (Last Created Unit) is the problem, then make a dummy unit rather than just using a footman.

If the range of carrion swarm is too low, you're removing the unit before he can actually cast the spell. Increase wait time maybe?

This part is also key that some people realise and slap themselves on the head for forgetting. Make sure the unit casting has enough mana to cast the spell if there's a mana requirement! A lot of people forget to do this so it's key :p
 

Ayanami

칼리
Reaction score
288
You only need 1 dummy to cast 9 shockwaves simultaneously. 1 dummy unit can do it. Basically, you need to create this dummy during map initialization. Set this dummy to a unique unit variable, like "CasterDummy". Here are the things that you NEED to change to make the dummy unit cast a spell instantly and to have a reliable dummy unit.

Abilities - Normal: Locust
Animation - Cast Backswing: 0.00
Animation - Cast Point: 0.00
Art - Has Water Shadow: False
Art - Model File: none.mdl (type it in "Custom")
Art - Shadow Image (Unit): None
Combat - Attacks Enabled: None
Combat - Death Type: Can't raise, Does not decay
Movement - Speed Base: 0
Movement - Speed Maximum: 0
Movement - Speed Minimum: 0
Movement - Type: Fly
Pathing - Collision Size: 0.00
Stats - Food Cost: 0
Stats - Sight Radius (Day): 0
Stats - Sight Radius (Night): 0

With this, you can use this single dummy to cast spells multiple times at a single instance. All you have to do is change the ownership of the CasterDummy to the owner of the caster and then add the carrion swarm ability to it. Then order it to cast carrion swarm and then remove the ability.

Next time, use WC3 tags for your GUI codes. You can use WC3 by pressing that "a" button at the option tabs (towards the right of where all the Bold options, Italic options, etc. are located at).
 

Potatisbil

New Member
Reaction score
6
A unit does not have to have a model or look like anything in order to cast spells, it just must be on the map.

Try getting rid of Unit - Hide (Last Created Unit) and see if it works then. Also it's key that the spell "Carrion Swarm" has a high enough range, and i'm not sure if it matters if it's a hero ability or not. You can try both ways. If the Unit - Hide (Last Created Unit) is the problem, then make a dummy unit rather than just using a footman.

If the range of carrion swarm is too low, you're removing the unit before he can actually cast the spell. Increase wait time maybe?

This part is also key that some people realise and slap themselves on the head for forgetting. Make sure the unit casting has enough mana to cast the spell if there's a mana requirement! A lot of people forget to do this so it's key :p

I haven't used hide for some time now, so that I would be able to see how the units reacted. The thing is, I tried with an unmodified version of carrion swarm (except changing it to require 0 mana), It didn't work (the point where they're supposed to cast it is about 600 units away from them, 100 units less than the maximum range of the spell). Did the exact same thing with shockwave (also tried just making the unit move to the point), and it works perfectly.

Err...EDIT: I tried changing the actual caster spell (based on channel), and it worked. Once. I made a small trigger just to try out the issuing thingy on a smaller scale:
Trigger:
  • Events
    • Player - Player 1 (Red) types a chat message containing k as An exact match
    • Actions
      • Unit - Create 1 Footman for Player 1 (Red) at ((Center of (Playable map area)) offset by 256.00 towards 0.00 degrees) facing Default building facing degrees
      • Unit - Add Torment (carrion dummy) to (Last created unit)
      • Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm (Center of (Playable map area))


It works, IF it is used at least one time BEFORE "Torment" (A.k.a. the other spell), and this also causes Torment to work. So... in some fucked up way, the smaller trigger is affecting the other spell. :nuts:

Thanks for the tips Glen, will have to try that out at a later time. :)

Also, attaching the map itself, if anyone can be bothered to actually check why it's acting so weird (not actually needed, since my spell *is* working, but.. yeah, I have to use the trigger above first. :p)
 

Attachments

  • Bobs test bana.w3x
    23.8 KB · Views: 165
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top