Nether Ambush trigger help.

Father_Yetti

New Member
Reaction score
46
I have a Nether Revenant Hero in my game. His ult is Called Nether Ambush and it is suppose to spawn 3 replicas of him that last for 10 seconds each. They have the locust ability so you can't control them and I want them to attack the same units that the casting Hero targets. If he attacks no units that's fine they can attack at will, however, I want them to attack the targets the casting Hero chooses when he does. If they could follow him this would be nice too. I wasn't sure how many commands you can give and which ones overide others.

Nether Ambush Cast:
Trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Nether Ambush (Nether Revenant)
    • Actions
      • Set Nether_Caster = (Triggering unit)
      • Countdown Timer - Start Nether_Timer as a One-shot timer that will expire in 10.00 seconds
      • Set Nether_Timer = (Last started timer)
      • Trigger - Turn on Nether Timmer Expires <gen>
      • Trigger - Turn on Nether Attack Command <gen>
      • Trigger - Turn on Nether Ambush Trigger <gen>
      • Wait 10.00 seconds
      • Trigger - Turn off Nether Ambush Trigger <gen>


Nether Ambush Trigger:
Trigger:
  • Events
    • Time - Every 6.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Set Nether_CasterLoc = (Position of Nether_Caster)
          • Set TempPoint5 = (NetherStrike_CasterLoc offset by 200.00 towards ((120.00 x (Real((Integer A))))
          • Set NetherAmbush_Group = (Units within 400.00 of TempPoint5 matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) belongs to an enemy of (Owner of Nether_Caster)) Equal to True) and (((Matching unit) is alive) Equal to True))))
          • Unit Group - Pick every unit in NetherAmbush_Group and do (Actions)
            • Loop - Actions
              • Unit - Create 1 Nether Revenant (Dummy) for (Owner of Nether_Caster) at TempPoint5 facing Default building facing degrees
              • Set NetherDummy_Group = (Last created unit group)
              • Hero - Set (Last created unit) Hero-level to (Level of Nether_Caster), Show level-up graphics
              • Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
              • Unit - Order (Last created unit) to Attack (Picked unit)
          • Special Effect - Create a special effect at TempPoint5 using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Special Effect - Create a special effect at TempPoint5 using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_TempPoint5)
          • Custom script: call RemoveLocation(udg_Nether_CasterLoc)
          • Custom script: call DestroyGroup(udg_NetherAmbush_Group)


Nether Timmer Expires:
Trigger:
  • Events
    • Time - Nether_Timer expires
    • Conditions
    • Actions
      • Trigger - Turn off Nether Attack Command <gen>
      • Unit Group - Pick every unit in NetherDummy_Group and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game


Nether Attack Command:
Trigger:
  • Events
    • Unit - A unit Is attacked
    • Conditions
      • (Attacking unit) Equal to Nether_Caster
    • Actions
      • Set Nether_TargetUnit = (Attacked unit)
      • Unit Group - Pick every unit in NetherDummy_Group and do (Actions)
        • Loop - Actions
          • Unit - Order (Picked unit) to Attack Nether_TargetUnit


I have tried this like 5 different ways and I don't even think I am approaching it right or have gotten close. Its embarrasing I really don't quite know how to do this.
 

BarzahdX

Active Member
Reaction score
18
From the sounds of things, you want 3 units to follow you around, be unattackable, focus fire your target, and attack whoever if your main isn't doing anything.

You get all that and more if you use the "Locust Swarm" ability, give it a shot, and tell me how it goes.. If it doesn't work properly, I have a good idea for some triggering that should work.. Two ideas, actually, depending on how you want it to operate.
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
your loop in Nether Ambush trigger isn't kinda good...it wont create 3 replicas, it will create 1 replica for each picked unit
you made the triggers so unnecessary complicated...
 

Komaqtion

You can change this now in User CP.
Reaction score
469
@BarzahdX
But then they'll not attack his main target would they?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
I haven't tried is out but i think this should work, at least for making the revenants and ordering them to attack the main target:
Code:
Nether Ambush
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Nether Ambush
    Actions
        Set Caster = (Triggering unit)
        Trigger - Run Revenants <gen> (checking conditions)
        Trigger - Turn on Revenants Attacking <gen>
        Trigger - Turn on Caster Stops <gen>
        Wait 10.00 seconds
        Trigger - Turn off Revenants Attacking <gen>
        Trigger - Turn off Caster Stops <gen>
Code:
Revenants
    Events
    Conditions
    Actions
        Set Caster_Loc = (Position of Caster)
        Set Hero_Level = (Hero level of Caster)
        For each (Integer A) from 1 to 3, do (Actions)
            Loop - Actions
                Set Temp_Point = (Caster_Loc offset by 200.00 towards ((Real((Integer A))) x 120.00) degrees)
                Unit - Create 1 Revenant for (Owner of Caster) at Temp_Point facing Default building facing degrees
                Set Revenant_Dummy[(Integer A)] = (Last created unit)
                Hero - Set Revenant_Dummy[(Integer A)] Hero-level to Hero_Level, Hide level-up graphics
                Unit - Add a 10.00 second Generic expiration timer to Revenant_Dummy[(Integer A)]
        Trigger - Turn on (This trigger)
        Custom script:   call RemoveLocation(udg_Temp_Point)
        Custom script:   call RemoveLocation(udg_Caster Loc)
Code:
Revenants Attacking
    Events
        Unit - A unit Is attacked
    Conditions
        (Attacking unit) Equal to Caster
    Actions
        Set Main_Target = (Attacked unit)
        For each (Integer A) from 1 to 3, do (Actions)
            Loop - Actions
                Unit - Order Revenant_Dummy[(Integer A)] to Attack Main_Target
Code:
Caster Stops
    Events
        Unit - A unit Is issued an order with no target
    Conditions
        (Triggering unit) Equal to Caster
    Actions
        Custom Script. call bj_wantDestroyGroup=true // Sorry don't know if this is the right code.
        For each (Integer A) from 1 to 3, do (Actions)
            Loop - Actions
                Set Dummy_Loc = (Position of Revenant_Dummy[(Integer A)])
                Set Random_Group = (Units within 512.00 of Dummy_Loc matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)))
                Unit Group - Pick every unit in (Random 1 units from Random_Group) and do (Actions)
                    Loop - Actions
                        Set Random_Target = (Picked unit)
                        Unit - Order Revenant_Dummy[(Integer A)] to Attack Random_Target
        Custom script:   call RemoveLocation(udg_Dummy_Loc)
 

BarzahdX

Active Member
Reaction score
18
From my experiences, they do attack your target. Try setting the "Swarm Maximum" or something like that to 100, or whatever the cap may be.

NOTE: Technically, with 3 units, the maximum would only have to be 3, but better safe than sorry.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
But i thought he wanted the Revenant to attack and stuff so it looks more real.
 
General chit-chat
Help Users
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      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