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
  • No one is chatting at the moment.
  • 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 The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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