Creeps stop moving after casting spells in my TD

Exoudar

New Member
Reaction score
2
Hello there,

I have a creep that when die will spawn a unit, also a boss that cast spells every often.

Now In order to keep them moving, I made a large trigger, and its boring to do that trigger for every single creep FOR every single player !

here is what I did and I am sure there is a better way around, that's what i need.

Trigger:
  • Pit Lord Anti Stuck
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Holy Light (lvl 10 boss)
          • (Ability being cast) Equal to Pit Lord Summoning
    • Actions
      • Wait 0.25 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Go to 1 red <gen> contains (Casting unit)) Equal to True
        • Then - Actions
          • Unit - Order (Casting unit) to Move To (Center of Moving Red 1 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (go to 2 red <gen> contains (Casting unit)) Equal to True
        • Then - Actions
          • Unit - Order (Casting unit) to Move To (Center of Moving Red 2 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (go to 3 red <gen> contains (Casting unit)) Equal to True
        • Then - Actions
          • Unit - Order (Casting unit) to Move To (Center of Moving Red 3 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (go to 4 red <gen> contains (Casting unit)) Equal to True
        • Then - Actions
          • Unit - Order (Casting unit) to Move To (Center of Moving Red 4 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (go to 5 red <gen> contains (Casting unit)) Equal to True
        • Then - Actions
          • Unit - Order (Casting unit) to Move To (Center of Moving Red 5 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (go to 6 red <gen> contains (Casting unit)) Equal to True
        • Then - Actions
          • Unit - Order (Casting unit) to Move To (Center of Moving Red 6 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (go to 7 red <gen> contains (Casting unit)) Equal to True
        • Then - Actions
          • Unit - Order (Casting unit) to Move To (Center of Moving Red 7 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (go to 8 red <gen> contains (Casting unit)) Equal to True
        • Then - Actions
          • Unit - Order (Casting unit) to Move To (Center of Moving Red 8 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (go to END red <gen> contains (Casting unit)) Equal to True
        • Then - Actions
          • Unit - Order (Casting unit) to Move To (Center of Wave Ends Red <gen>)
        • Else - Actions


EDIT: add image
Here is an image
http://postimage.org/image/5i8g8hw0h/

where the small Squares are "Moving red 1", and the large ones are "Go to red 1"
 

Attachments

  • Untitled.gif
    Untitled.gif
    683.2 KB · Views: 219

Mr_Bean355

Member
Reaction score
10
- Fix memory leaks (Center of Moving Red 1 etc.).
- Replace Casting Unit with Triggering Unit (faster to run).
- Move each If (except 1st one) below the Else - Actions of the previous If. This way it will skip all the remaining actions instead of checking each If.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top