[Solved] Trigger rework

Status
Not open for further replies.
Level 7
Joined
Sep 19, 2012
Messages
204
Hey guys...

I am (again :rolleyes:) working on a new project and i am stuck with a specific Trigger right now. It works...well... most of the time, but it isnt very efficient (not mentioning the leaks im still too lazy to fix).
My brain just decided that it doesnt want to work anymore, so i have no clue how to fix it.

Somebody who can help me out quick?

  • Add mobs
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Blessing Light
        • Then - Actions
          • Item - Remove (Item being manipulated)
          • Set temp_point = (Position of (Hero manipulating item))
          • Unit - Create 1 Cast Dummy for (Owner of (Hero manipulating item)) at temp_point facing Default building facing degrees
          • Custom script: call RemoveLocation (udg_temp_point)
          • Set tempcaster = (Last created unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Current research level of Bless Allies for (Owner of (Hero manipulating item))) Equal to 1
            • Then - Actions
              • Unit - Order tempcaster to Orc Witch Doctor - Healing Ward (Center of Lane1 <gen>)
              • Wait 1.00 seconds
              • Unit - Order tempcaster to Orc Witch Doctor - Healing Ward (Center of Lane2 <gen>)
              • Wait 1.00 seconds
              • Unit - Order tempcaster to Orc Witch Doctor - Healing Ward (Center of Lane3 <gen>)
              • Wait 1.00 seconds
              • Unit - Order tempcaster to Orc Witch Doctor - Healing Ward (Center of Lane4 <gen>)
            • Else - Actions
              • Unit - Order tempcaster to Orc Witch Doctor - Healing Ward ((Position of (Hero manipulating item)) offset by 1400.00 towards 0.00 degrees)
          • Wait 0.50 seconds
          • Unit - Remove tempcaster from the game
        • Else - Actions

What i want it to do:

Create a special ward in the middle of a lane. When the player has a certain research, place a ward in the middle of all 4 lanes.

Greetings CodeBlack
 
Level 16
Joined
Mar 25, 2016
Messages
1,327
Why do you need a dummy to create the wards? I think you can just use create a unit for the wards. You can add a expiration timer, if you want them to be temporary.
Maybe becuase of waits and MUI your trigger does not work always?
I would just create the wards with trigger so you don't need a dummy and no waits.
 
Level 7
Joined
Sep 19, 2012
Messages
204
Why do you need a dummy to create the wards? I think you can just use create a unit for the wards. You can add a expiration timer, if you want them to be temporary.
Maybe becuase of waits and MUI your trigger does not work always?
I would just create the wards with trigger so you don't need a dummy and no waits.

Well...as is stated before: my brains turned off...but now i feel even more stupid xD
Thanks man....ill try it tomorrow and report how its been working :D
For some reason my thoughts were like: hell its more than one unit i cant use triggers...

EDIT: well as expected it works fine...thx for kicking my lazy brain ^^
 
Last edited:
Status
Not open for further replies.
Top