• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Mass Rejuvinate + Question about NPC-Cast Abilities

Status
Not open for further replies.
Level 4
Joined
Oct 9, 2009
Messages
50
Resolved. Thank you.

Hello. I was here a long time ago with a question about my Damage/Heal over Time trigger, and got a lot of helpful responses (and a sweet, functioning spell out of it). Since then I've lurked silently, starting and scrapping projects, playing a metric ton of maps, and trying to work with triggers.

I've learned a bit, and searching has answered a lot of questions before I had to ask them, but I'm running into issues with my latest project.

I know only GUI. JASS is a foreign concept to me, and the three times I've tried to pick it up, I've been lost and confused, so I'd like to stay within the bounds of GUI.

Resolved Issue: Certain triggers not functioning properly when cast by the computer.

Small explanation of the map
: This is like a single-player DotA/Hero Siege, I guess. You pick a hero, and fight alongside three armies of allies (NPCs at this time, may go Multiplayer in the future) to siege, destroy, and dismantle one giant castle. Every 30 seconds, waves of enemies clash and it's up to you to turn the tide. The allied bases will fall after around an hour of playtime, so time is a factor.

At the front of each base is that team's Faction Hero, who will defend against wave after wave until they are eventually overpowered. To make the map seem more epic and interesting, I have given all of the heroes Trigger-enhanced spells.

The problem I'm seeing, is that the spells do not work when cast by an NPC.

For example:
  • Muradin Ult
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to (Muradin) Paralyzing Fear
    • Actions
      • Set Temp_Point = (Position of (Casting unit))
      • Set Temp_Group = (Units within 800.00 of Temp_Point matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True)))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy - Generic for (Owner of (Casting unit)) at Temp_Point facing Default building facing degrees
          • Unit - Add (Dummy) Muradin Fear to (Last created unit)
          • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Drunken Haze (Picked unit)
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_Temp_Point)
      • Custom script: call DestroyGroup(udg_Temp_Group)
(Muradin) Paralyzing Fear is based off of Howl of Terror. When cast manually by myself, it works correctly. Looks like Psychic Scream (for those who know World of Warcraft), disables the attacks and spells of all nearby enemies in an AoE around the casting unit, despite Drunken Haze requiring an enemy target, in addition to adding an armor penalty because of the Howl of Terror base. I like it a lot.

However, when Muradin is under the control of a Computer, it fails. It still applies the Howl of Terror Armor Reduction, but doesn't actually do anything. I had a theory that the dummies were not registering correctly, but after going over the trigger a few times, I cannot decipher why.

Is this a limitation in the editor? Something I've overlooked in the Trigger? Wording is wrong? I have a few other triggers that work perfectly when cast by computer teams, just not this one.

RESOLVED


So now, this trigger I'm having issues with:
  • Tyrande MassRej
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to (Tyrande) Mass Rejuvinate
    • Actions
      • Set Temp_Point = (Position of (Casting unit))
      • Set Temp_Group = (Units within 600.00 of (Position of (Target unit of ability being cast)) matching (((((Matching unit) is A Hero) Equal to False) and (((Matching unit) is alive) Equal to True)) and (((Matching unit) belongs to an ally of (Owner of (Casting unit))) Equal to T
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy - Generic for (Owner of (Casting unit)) at Temp_Point facing Default building facing degrees
          • Unit - Add (Dummy) Mass Rejuvinate to (Last created unit)
          • Unit - Order (Last created unit) to Night Elf Druid Of The Claw - Rejuvenation (Picked unit)
          • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_Temp_Point)
      • Custom script: call DestroyGroup(udg_Temp_Group)
Ideally, this ability is cast as Rejuvinate is (single target, requires friendly non-structure), then creates a ton of little dummies to cast further rejuvinates on all nearby applicable units. It also needs to be an ability that the computer is smart enough to cast in response to taking damage, without being auto-cast or manually triggered into casting.

Ideas: I do not have any other triggers that activate off of Rejuvinate, but Rejuvinate and the Dummy version are both Rejuvinate base. Could that be a problem? I have made sure that the Dummy has no mana cost, cast time, or requirements, and is also a Unit ability, rather than Hero.


---

Thank you in advance for any help offered. I know a lot of people come through wanting you to double-check their homework, and it's usually a thankless job, but I appreciate it very much.

EDIT:
Enclosed is a bare-bones test map that includes:

A hero of each type experiencing the issue (one Tyrande with MassRej, one Muradin with Paralyzing Fear) for three teams (player, ally, and enemy)

A handful of test knights on which to cast said abilities

I'm probably missing something big and obvious. Most other abilities (even a few which use a dummy system) cast by computer players do work.

Thank you for your time.
^ That post contains a sample map experiencing this isssue.
 
Last edited:
Level 4
Joined
Oct 9, 2009
Messages
50
Thank you, that fixed the first problem.

Is there a guide for when to use which? Starts Effect, Finishes Casting, etc. I get them confused, as some triggers only work with Finishes Casting. I looked, but did not find one in the tutorials section.

The second question is still unresolved. Manually casting the ability when I own the unit in question causes the trigger to work fine.

When the ability is cast by a computer, it does not work as intended.
 
Level 4
Joined
Oct 9, 2009
Messages
50
Muradin is owned by Computer 3. I suppose I could manually change all of the Conditions to reflect that. Testing if that resolves the issue.
 
Last edited:
Level 4
Joined
Oct 9, 2009
Messages
50
Manually changing the condition checking to "matching unit belongs to an ally of Player 3" did not work, nor did Create 1 Dummy - Generic for Player 3.

In fact, despite being allied with Player 3, it stopped working when manually cast by the Hero I control. Changing that back so it (at least) works for me.

EDIT: I've heard of MUI triggers. Temp_Player, Temp_Point, and Temp_Group are used in nearly all of my triggers. Could that be an issue? IE: periodic event sets Temp_Point, this trigger executes while Temp_Point is still being called upon, or even rewritten, thus the Dummies are spawning halfway across the map for PlayerX instead of over there for PlayerY? Or do Triggers execute so fast that there's no risk of cross contamination?

I mean, the Triggers work perfectly for me all of the time without fail. They just absolutely do not respond when the triggering ability being cast belongs to a player other than myself.
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,240
It could be the targets allowed in object editor, or that the players are not enemies. Could you post a test map, so it can be debugged easily and faster than just by guessing and looking at the trigger?

You can share variables with different triggers, when used correctly like your trigger does. Two triggers can't run at the same time.
 
Level 4
Joined
Oct 9, 2009
Messages
50
Enclosed is a bare-bones test map that includes:

A hero of each type experiencing the issue (one Tyrande with MassRej, one Muradin with Paralyzing Fear) for three teams (player, ally, and enemy)

A handful of test knights on which to cast said abilities

I'm probably missing something big and obvious. Most other abilities (even a few which use a dummy system) cast by computer players do work.

Thank you for your time.
 

Attachments

  • Test.w3x
    59.7 KB · Views: 58
Level 4
Joined
Oct 9, 2009
Messages
50
I hate to bump this, but it has been a few days, and my issue is unresolved. The attached test map is showing 0 views, so I don't know if anyone has taken a look into it.

It's a rather odd issue, and it probably has a very obvious solution that I am unable to see. Again, any help is greatly appreciated.
 
Level 4
Joined
Oct 9, 2009
Messages
50
Wow, that worked. I am so dumb, thank you. Dummy - Generic is the only dummy who I forgot to do that for. I didn't think it'd be the problem, because the spells always functioned properly when I used it, but now everything works. Editing post to reflect the resolved status.

Thank you for your help!
 
Level 3
Joined
Dec 9, 2009
Messages
35
I have solved it :
Just set
  • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
before ordering and it work
  • Muradin Ult
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (Muradin) Paralyzing Fear
    • Actions
      • Set Temp_Player = (Owner of (Casting unit))
      • Set Temp_Point = (Position of (Casting unit))
      • Set Temp_Group = (Units within 800.00 of Temp_Point matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of Temp_Player) Equal to True)))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy - Generic for Temp_Player at Temp_Point facing Default building facing degrees
          • Unit - Add (Dummy) Muradin Fear to (Last created unit)
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Drunken Haze (Picked unit)
      • Custom script: call RemoveLocation(udg_Temp_Point)
      • Custom script: call DestroyGroup(udg_Temp_Group)
 
Status
Not open for further replies.
Top