Custom Carrion Swarm Spell

Raizn

New Member
Reaction score
2
Hi Helpers
i need a helping hand to optimize this Trigger. Everything works but the trigger itself is a bit...hm...ugly.

Trigger:
  • Lightning Strike
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Lightning Strike
    • Actions
      • Unit - Create 1 Lightning Dummy for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by (0.00, 100.00)) facing 90.00 degrees
      • Unit - Add Carrion Swarm to (Last created unit)
      • Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm ((Position of (Triggering unit)) offset by (0.00, 0.00))
      • Unit - Create 1 Lightning Dummy for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by (0.00, -100.00)) facing 270.00 degrees
      • Unit - Add Carrion Swarm to (Last created unit)
      • Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm ((Position of (Triggering unit)) offset by (0.00, 0.00))
      • Unit - Create 1 Lightning Dummy for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by (100.00, 0.00)) facing 0.00 degrees
      • Unit - Add Carrion Swarm to (Last created unit)
      • Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm ((Position of (Triggering unit)) offset by (0.00, 0.00))
      • Unit - Create 1 Lightning Dummy for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by (-100.00, 0.00)) facing 180.00 degrees
      • Unit - Add Carrion Swarm to (Last created unit)
      • Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm ((Position of (Triggering unit)) offset by (0.00, 0.00))


how do i merge this ? i tried to pick every unit and order picked unit to cast CS. doesnt work. -.-

bye raizn
 

Tru_Power22

You can change this now in User CP.
Reaction score
144
Use a loop, and use interger A * 90 for your facing. Should achieve the same effect.
 

Tyrulan

Ultra Cool Member
Reaction score
37
Trigger:
  • Actions
    • For each (Integer A) from 1 to 4, do (Actions)
      • Loop - Actions
    • Unit - Create 1 Footman for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by 100.00 towards ((Real((Integer A))) x 90.00) degrees) facing ((Real((Integer A))) x 90.00) degrees
    • Special Effect - Create a special effect attached to the overhead of (Last created unit) using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
    • Unit - Order (Last created unit) to Move To (Position of (Triggering unit))


Should be self-explanatory.
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
Might want to give those dummies an expiration timer so they don't leak.
 

Raizn

New Member
Reaction score
2
ye i noticed that after posting the trigger and fixed it already. but thanks a lot for that.

final spell

Trigger:
  • Lightning Strike 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Lightning Strike
    • Actions
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • Wait 3.00 seconds
          • Unit - Create 1 Lightning Dummy for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by 100.00 towards ((Real((Integer A))) x 90.00) degrees) facing 90.00 degrees
          • Unit - Add Carrion Swarm to (Last created unit)
          • Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm ((Position of (Triggering unit)) offset by (0.00, 0.00))
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)


Trigger:
  • Lightning Strike 2
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Lightning Strike
    • Actions
      • Unit Group - Pick every unit in (Units within 800.00 of (Position of (Triggering unit))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of (Triggering player)) Equal to True
            • Then - Actions
              • Special Effect - Create a special effect at (Position of (Picked unit)) using unholyStrikeX2c.mdx
              • Unit - Cause (Triggering unit) to damage (Picked unit), dealing (100.00 x (Real((Level of Lightning Strike for (Triggering unit))))) damage of attack type Chaos and damage type Normal
            • Else - Actions
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
use location variables so you can destroy them and remove leaks
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top