Closing gates automatically

Pritrostell

New Member
Reaction score
1
Hello to all who read this...

So basically i have a unit that casts an ability which does nothing, then a trigger tells the target of the ability (debris only) to open (gates).

My issue is getting the gate that was opened to then close after a 4 second wait period but after browsing through the available triggers i cannot come up with a solution.

So my questions are:

- Is there a way to have the gate auto-close after a wait period
- If not, is there a way to target open gates with abilities (make a secondary close)

thanks again for any help and i hope for a quick response
 

Pritrostell

New Member
Reaction score
1
I just found out that my custom ability does not put the custom buff i have created onto the hero. The buff gives no bonuses and is there strictly for triggers that will later decide the level of gate that the ability will work on.

Simple:

Ability learned allows you to open gates when cast on debris(gates)

Trigger checks if the ability being cast is equal to the correct ability
Trigger checks if buff from ability is on triggering unit

If the above is found to be true, then the gate is opened

Problems:

Buff from ability is not being placed or appearing on my hero when he learns the skill and i cannot find any trigger action to place it on him when the ability is learned.

Thanks ahead for any help.
 

millz-

New Member
Reaction score
25
Create a new custom ability that has no icon shown (preferably an item ability). Give this new ability that buff icon.

When your hero learns that gate-opening ability, use trigger to add the new ability with the buff icon to your hero.


And actually, I don't think the buff icon is even necessary in this case. You just had to check if the ability cast is the gate opening one, if it is, open the gate.
 

Danis[h]

New Member
Reaction score
19
You have to save the gates to a variable.. I did this.
Trigger:
  • GATE ARRRRRGH
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Open Gate! woop woop
    • Actions
      • Set I_AM_HERE_POINT_ARGH = (Position of (Casting unit))
      • Destructible - Pick every destructible within 1000.00 of I_AM_HERE_POINT_ARGH and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Destructible-type of (Picked destructible)) Equal to Demonic Gate (Horizontal)
                  • (Destructible-type of (Picked destructible)) Equal to Elven Gate (Vertical)
            • Then - Actions
              • Set Count = (Count + 1)
              • Set GATES_AAAAARG[Count] = (Picked destructible)
              • Destructible - Open GATES_AAAAARG[Count]
            • Else - Actions
              • Do nothing
      • Custom script: call RemoveLocation(udg_I_AM_HERE_POINT_ARGH)
      • Wait 4.00 seconds
      • For each (Integer A) from 1 to Count, do (Actions)
        • Loop - Actions
          • Destructible - Close GATES_AAAAARG[(Integer A)]
      • Set Count = 0


NOTE: This will bug if cast more than once every 4 seconds and it can only be used by 1 player. If you want it to be MUI (or whatever) you need to either do this entirely different, or use local variables

Remember to add your gate type to the or - any condition :)
 
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