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.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top