I need help with a trigger.

Xebarsis

New Member
Reaction score
7
I'm trying to make it so that if a unit is damaged by a specific spell based on shockwave that a special effect will be created over the damaged unit. In other words, I want blood to squirt out for whoever gets hurt by the spell. I'm not sure how to do it though. Here's what I got, but it doesn't work:

Trigger:
  • Glaive Launcher
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Glaive Launcher Dummy
    • Actions
      • Set ThePoint = (Position of (Triggering unit))
      • Unit - Create 1 Dummy Glaive for (Owner of (Triggering unit)) at ThePoint facing Default building facing degrees
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave (Target point of ability being cast)
      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_ThePoint)

Trigger:
  • Glaive Damage
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Dummy Glaive
    • Actions
      • Set ThePoint = (Position of (Attacked unit))
      • Special Effect - Create a special effect at ThePoint using Objects\Spawnmodels\Human\HumanBlood\HumanBloodFootman.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation (udg_ThePoint)
 

Angel_Island

Much long, many time, wow
Reaction score
56
Use this:
Trigger:
  • Map Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Group = (Units in (Playable map area))
      • Unit Group - Pick every unit in Group and do (Actions)
        • Loop - Actions
          • Trigger - Add to Untitled Trigger 003 <gen> the event (Unit - (Picked unit) Takes damage)

Trigger:
  • Add Event
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Triggering unit) is in Group) Equal to False
    • Actions
      • Unit Group - Add (Triggering unit) to Group
      • Trigger - Add to Untitled Trigger 003 <gen> the event (Unit - (Triggering unit) Takes damage)

Trigger:
  • Untitled Trigger 003
    • Events
    • Conditions
      • ((Triggering unit) has buff Buff) Equal to True
    • Actions
      • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
      • Special Effect - Destroy (Last created special effect)

I tested it and it works and it is also MUI.
 

Xebarsis

New Member
Reaction score
7
Wait, I'm confused. I don't want any other abilities adding the blood effect, and shockwave doesn't add any buffs to any units so I don't understand how I could use this. :confused:
 

Xebarsis

New Member
Reaction score
7
Wait, now I get it.

The buff you're talking about is Shockwave (Caster).

Trigger:
  • Trigger 1
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Group = (Units in (Playable map area))
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Trigger - Add to Trigger 3 <gen> the event (Unit - (Picked unit) Takes damage)


Trigger:
  • Trigger 2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Triggering unit) is in Group) Equal to False
    • Actions
      • Unit Group - Add (Triggering unit) to Group
      • Trigger - Add to Trigger 3 <gen> the event (Unit - (Triggering unit) Takes damage)


Trigger:
  • Trigger 3
    • Events
    • Conditions
      • ((Triggering unit) has buff Shockwave (Caster)) Equal to True
    • Actions
      • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
      • Special Effect - Destroy (Last created special effect)


And to make it work with the glaive launcher and not other shockwaves I just have to change the name of the buff to something else. Sorry for doubting you, I just didn't understand at first. Thanks! :D
 

Xebarsis

New Member
Reaction score
7
Oh, do any of these triggers leak? If so what do I need to change and/or add to fix the leak? Units are constantly spawning in my game so it's important.
 

Ashcat

Hellooo
Reaction score
68
There is an extremely simple solution to this.

Make the actual spell that the hero has do nothing but target a point. When the spell is cast, make a dummy unit and have it cast the actual shockwave as a dummy spell. Then make a damage detection trigger, and detect when a unit is damaged by a unit with the dummy spell. Create special effect on the damaged unit and viola. Be sure you add like a 10 sec duration timer to your dummy unit instead of isntantly cleaning him up, so the trigger has the damaging unit to reference.
 

Xebarsis

New Member
Reaction score
7
There is an extremely simple solution to this.

Make the actual spell that the hero has do nothing but target a point. When the spell is cast, make a dummy unit and have it cast the actual shockwave as a dummy spell. Then make a damage detection trigger, and detect when a unit is damaged by a unit with the dummy spell. Create special effect on the damaged unit and viola. Be sure you add like a 10 sec duration timer to your dummy unit instead of isntantly cleaning him up, so the trigger has the damaging unit to reference.

I appreciate the suggestion, but I've already been given a solution to get the trigger to work, and it does. All I need to do now is confirm if there are leaks or not.

Does anyone know if there are leaks in the trigger, and what I'll need to do to fix the leaks?

Code:
    * Trigger 1
          o Events
                + Map initialization
          o Conditions
          o Actions
                + Set Group = (Units in (Playable map area))
                + Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
                      # Loop - Actions
                            * Trigger - Add to Trigger 3 <gen> the event (Unit - (Picked unit) Takes damage)


Code:
    * Trigger 2
          o Events
                + Unit - A unit enters (Playable map area)
          o Conditions
                + ((Triggering unit) is in Group) Equal to False
          o Actions
                + Unit Group - Add (Triggering unit) to Group
                + Trigger - Add to Trigger 3 <gen> the event (Unit - (Triggering unit) Takes damage)


Code:
    * Trigger 3
          o Events
          o Conditions
                + ((Triggering unit) has buff Shockwave (Caster)) Equal to True
          o Actions
                + Special Effect - Create a special effect attached to the origin of (Triggering unit) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
                + Special Effect - Destroy (Last created special effect)
 

Ashcat

Hellooo
Reaction score
68
Code:
* Trigger 1
          o Events
                + Map initialization
          o Conditions
          o Actions
                + Set Group = (Units in (Playable map area))
                + Unit Group - Pick every unit in [COLOR="Red"]Group[/COLOR] and do (Actions)
                      # Loop - Actions
                            * Trigger - Add to Trigger 3 <gen> the event (Unit - (Picked unit) Takes damage)
[COLOR="Red"]Custom Script: call DestroyGroup (udg_Group)[/COLOR]

That looks like it
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
There is an extremely simple solution to this.

Make the actual spell that the hero has do nothing but target a point. When the spell is cast, make a dummy unit and have it cast the actual shockwave as a dummy spell. Then make a damage detection trigger, and detect when a unit is damaged by a unit with the dummy spell. Create special effect on the damaged unit and viola. Be sure you add like a 10 sec duration timer to your dummy unit instead of isntantly cleaning him up, so the trigger has the damaging unit to reference.

Yup, i means this.:thup:
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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 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 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