• 🏆 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 Problem: Spell does not work.

Status
Not open for further replies.
Level 3
Joined
Mar 22, 2020
Messages
46
Hi guys, i have a problem with this two triggers but i dont know what the problem actually is since i think they are well done (other trigger that i have done with the same approach works fine) but, clearly it's not.
Can someone help me find what's wrong? : D

P.S. The first ability (Divine Radiance) is a passive one that should automatically generate a 3 seconds divine shield on an ally with less that 20% hp.
 

Attachments

  • Divine Radiance (Bug to Fix).png
    Divine Radiance (Bug to Fix).png
    28.9 KB · Views: 87
  • Heaven Blessing (Not Fixed).png
    Heaven Blessing (Not Fixed).png
    8.1 KB · Views: 83
Last edited:
Level 8
Joined
Jul 10, 2018
Messages
383
Hi guys, i have a problem with this two triggers but i dont know what the problem actually is since i think they are well done (other trigger that i have done with the same approach works fine) but, clearly it's not.
Can someone help me find what's wrong? : D

P.S. The first ability (Divine Radiance) is a passive one that should automatically generate a 3 seconds divine shield on an ally with less that 20% hp.
You're leaking a point in KHeavens and leaking Unit group.

The problem is Percentage life try to make it an Integer(Percentage life) instead of just Percentage life because sometimes it doesn't count it as percentage but as a value.
 
Level 8
Joined
Jul 10, 2018
Messages
383
You're leaking a point in KHeavens and leaking Unit group.

The problem is Percentage life try to make it an Integer(Percentage life) instead of just Percentage life because sometimes it doesn't count it as percentage but as a value.
other than that i dont see any problems with the triggers can you specify the problem?
 
Level 3
Joined
Mar 22, 2020
Messages
46
You're leaking a point in KHeavens and leaking Unit group.

The problem is Percentage life try to make it an Integer(Percentage life) instead of just Percentage life because sometimes it doesn't count it as percentage but as a value.
I tried just now and it doesn't work anyway, i really don't know what's wrong with this trigger...
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,503
1) Don't use the Event A unit Begins casting an ability, use A unit Starts the effect of an ability
2) Don't use Waits in your Pick Every Unit function
3) Don't use Do Nothing
4) Your Unit Group's Array Size should be equal to the maximum number of players
5) You cannot reference Target unit of ability being cast after a Wait
 
Level 3
Joined
Mar 22, 2020
Messages
46
1) Don't use the Event A unit Begins casting an ability, use A unit Starts the effect of an ability
2) Don't use Waits in your Pick Every Unit function
3) Don't use Do Nothing
4) Your Unit Group's Array Size should be equal to the maximum number of players
5) You cannot reference Target unit of ability being cast after a Wait
Oh wow, that's really interesting. I didnt know i had done so many errors xD
How can i fix this triggers then ? as you can see some "wait" are fundamental for the abilities to work properly, any suggestion ?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,503
I'll try and come up with some easy solutions.

Also, i'm curious, Divine Radiance is a passive ability with a triggered cooldown, correct? Does it work the way you wanted it to? What ability is it based on for the passive effect? Or is it not even passive?

Another thing I noticed is that you're referencing Triggering Unit in your Pick Every Unit function. "Make triggering unit vulnerable", this is supposed to be EDIT: "Make attacked unit vulnerable".

Also, how does your Unit Group work for KHeavens? Can a player control more than 1 unit with the Divine Radiance ability? How many units can be in each player's Unit Group and how are they added to it?
 
Last edited:
Level 3
Joined
Mar 22, 2020
Messages
46
I'll try and come up with some easy solutions.

Also, i'm curious, Divine Radiance is a passive ability with a triggered cooldown, correct? Does it work the way you wanted it to? What ability is it based on for the passive effect? Or is it not even passive?

Another thing I noticed is that you're referencing Triggering Unit in your Pick Every Unit function. "Make triggering unit vulnerable", this is supposed to be "Make picked unit vulnerable".

I'll post some triggers in a little while.
Divine Radiance is not really based on something since it's effect is all about triggers.
The only part that is based on something is the icon were the cooldown is shown and that is just a berserk ability (so is a "fake" passive since you can click on it).
Secondly i can tell you that the abilty works perfectly fine if i make it clear (no " Owner of picked unit" but "Player 1 Red" just to give an example).
Also is not supposed to make picked unit invulnerable but any other unit that is considered an ally (of the player owing the unit that have this abilities).

Anyway thank for help, I'll wait for your suggestion to fix them :D
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,503
I meant attacked unit actually, my mistake.

Also, how does your Unit Group work for KHeavens? Can a player control more than 1 unit with the Divine Radiance ability? How many units can be in each player's Unit Group and how are they added to it?

Is it supposed to be a "global" ability that protects allies anywhere on the map? Or is it more like an Aura that protects nearby allies?
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,503
Here you go. I used multiple techniques as well as a "system" I made for creating Special Effects that will be destroyed after a designated delay.

I use a technique called Shadowing which allows you to turn Global variables into Local variables. This allows you to make MUI spells very easily. It also makes Waits useful since the information won't be lost between them and you won't have to worry about variables changing to something else. More info can be found here: local udg_

Here's Divine Guidance. In order to use Waits inside of a Pick Every Unit function without issues, you need to run them in another trigger like I did and use the Shadowing technique I described above.

Otherwise, you'll run into all sorts of problems as it won't be MUI and other triggers will interfere with one another. With this setup it will guarantee that nothing goes wrong.
  • Divine Guidance Proc
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Percentage life of (Attacked unit)) Less than or equal to 20.00
      • ((Attacked unit) is A Hero) Equal to True
      • ((Attacking unit) belongs to an enemy of (Owner of (Attacked unit)).) Equal to True
      • (Number of units in DG_Group[(Player number of (Owner of (Attacked unit)))]) Greater than 0
    • Actions
      • Unit Group - Pick every unit in DG_Group[(Player number of (Owner of (Attacked unit)))] and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Ability Cooldown Remaining of (Picked unit) for ability Divine Radiance ..) Less than or equal to 0.00
              • ((Attacked unit) belongs to an ally of (Owner of (Picked unit)).) Equal to True
            • Then - Actions
              • Unit - For Unit (Picked unit), start cooldown of ability Divine Radiance " over "10.00 seconds.
              • Trigger - Run Divine Guidance Shield <gen> (ignoring conditions)
            • Else - Actions
  • Divine Guidance Shield
    • Events
    • Conditions
    • Actions
      • Custom script: local unit udg_TargetUnit
      • -------- --------
      • Set VariableSet TargetUnit = (Attacked unit)
      • Unit - Make TargetUnit Invulnerable
      • Special Effect - Create a special effect attached to the origin of TargetUnit using Abilities\Spells\Human\DivineShield\DivineShieldTarget.mdl
      • Set VariableSet Delayed_Duration = 3.00
      • Trigger - Run Delayed Destroy Effect <gen> (ignoring conditions)
      • Wait 3.00 seconds
      • Unit - Make TargetUnit Vulnerable
      • -------- --------
      • Custom script: set udg_TargetUnit = null
Here's the triggers for Heaven's Blessing. In my example I made it add a hidden Critical Strike ability that grants 100% chance to crit for 2x damage.
  • Heavens Blessing
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Heaven's Blessing
    • Actions
      • Custom script: local unit udg_TargetUnit
      • -------- --------
      • Set VariableSet TargetUnit = (Target unit of ability being cast)
      • Unit - Add Heaven's Blessing (Critical Strike) to TargetUnit
      • Wait 5.00 seconds
      • Unit - Remove Heaven's Blessing (Critical Strike) from TargetUnit
      • -------- --------
      • Custom script: set udg_TargetUnit = null

For Passive Abilities with cooldowns, you can use the Exhume Corpses ability as the base. This passive ability is the only ability (as of now) that can have a cooldown without being "clickable". Meaning, it acts exactly like a passive ability but you can use the "start cooldown of ability" Action to make it go on cooldown.

This removes the need of the Berserk stuff you were doing.
 

Attachments

  • Divine Guidance 1.w3m
    20.8 KB · Views: 56
Last edited:
Level 3
Joined
Mar 22, 2020
Messages
46
Here you go. I used multiple techniques as well as a "system" I made for creating Special Effects that will be destroyed after a designated delay.

I use a technique called Shadowing which allows you to turn Global variables into Local variables. This allows you to make MUI spells very easily. It also makes Waits useful since the information won't be lost between them and you won't have to worry about variables changing to something else. More info can be found here: local udg_

Here's Divine Guidance. In order to use Waits inside of a Pick Every Unit function without issues, you need to run them in another trigger like I did and use the Shadowing technique I described above.

Otherwise, you'll run into all sorts of problems as it won't be MUI and other triggers will interfere with one another. With this setup it will guarantee that nothing goes wrong.
  • Divine Guidance Proc
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Percentage life of (Attacked unit)) Less than or equal to 20.00
      • ((Attacked unit) is A Hero) Equal to True
      • ((Attacking unit) belongs to an enemy of (Owner of (Attacked unit)).) Equal to True
      • (Number of units in DG_Group[(Player number of (Owner of (Attacked unit)))]) Greater than 0
    • Actions
      • Unit Group - Pick every unit in DG_Group[(Player number of (Owner of (Attacked unit)))] and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Ability Cooldown Remaining of (Picked unit) for ability Divine Radiance ..) Less than or equal to 0.00
              • ((Attacked unit) belongs to an ally of (Owner of (Picked unit)).) Equal to True
            • Then - Actions
              • Unit - For Unit (Picked unit), start cooldown of ability Divine Radiance " over "10.00 seconds.
              • Trigger - Run Divine Guidance Shield <gen> (ignoring conditions)
            • Else - Actions
  • Divine Guidance Shield
    • Events
    • Conditions
    • Actions
      • Custom script: local unit udg_TargetUnit
      • -------- --------
      • Set VariableSet TargetUnit = (Attacked unit)
      • Unit - Make TargetUnit Invulnerable
      • Special Effect - Create a special effect attached to the origin of TargetUnit using Abilities\Spells\Human\DivineShield\DivineShieldTarget.mdl
      • Set VariableSet Delayed_Duration = 3.00
      • Trigger - Run Delayed Destroy Effect <gen> (ignoring conditions)
      • Wait 3.00 seconds
      • Unit - Make TargetUnit Vulnerable
      • -------- --------
      • Custom script: set udg_TargetUnit = null
Here's the triggers for Heaven's Blessing. In my example I made it add a hidden Critical Strike ability that grants 100% chance to crit for 2x damage.
  • Heavens Blessing
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Heaven's Blessing
    • Actions
      • Custom script: local unit udg_TargetUnit
      • -------- --------
      • Set VariableSet TargetUnit = (Target unit of ability being cast)
      • Unit - Add Heaven's Blessing (Critical Strike) to TargetUnit
      • Wait 5.00 seconds
      • Unit - Remove Heaven's Blessing (Critical Strike) from TargetUnit
      • -------- --------
      • Custom script: set udg_TargetUnit = null

For Passive Abilities with cooldowns, you can use the Exhume Corpses ability as the base. This passive ability is the only ability (as of now) that can have a cooldown without being "clickable". Meaning, it acts exactly like a passive ability but you can use the "start cooldown of ability" Action to make it go on cooldown.

This removes the need of the Berserk stuff you were doing.
The first spell work only on your test map and i don't know why... (Although I have been really careful in copying and pasting and then replacing your data with mine)
Second one is perfect, thanks a lot <3
 

Attachments

  • Divine Radiance part 1.png
    Divine Radiance part 1.png
    21.6 KB · Views: 49
  • Divine Radiance part 2.png
    Divine Radiance part 2.png
    13.9 KB · Views: 58
Level 13
Joined
May 10, 2009
Messages
868
The only part of your trigger that makes no sense to me is this condition right here
  • (Number of units in DG_Group[(Player number of (Owner of (Attacking unit)))]) Greater than 0
it should be just like how Uncle did it
  • (Number of units in DG_Group[(Player number of (Owner of (Attacked unit)))]) Greater than 0
  • -------- In fact, I'd rather use Triggering Unit, but whatever --------
 
Level 3
Joined
Mar 22, 2020
Messages
46
The only part of your trigger that makes no sense to me is this condition right here
  • (Number of units in DG_Group[(Player number of (Owner of (Attacking unit)))]) Greater than 0
it should be just like how Uncle did it
  • (Number of units in DG_Group[(Player number of (Owner of (Attacked unit)))]) Greater than 0
  • -------- In fact, I'd rather use Triggering Unit, but whatever --------
The two images are the same, i dont see any difference ^^'
Anyway i just copied and pasted his trigger from his map to my map and replaced his variables and units with mine, i really don't know what could have gone wrong :(
I also tried to replace "Attacked Unit" with "Triggered Unit" but it still doesn't work. I also tried the debug message thing about the "Proc" trigger and no message is shown :(
 
Level 13
Joined
May 10, 2009
Messages
868
The two images are the same, i dont see any difference ^^'
Untitled-1.png


Anyway i just copied and pasted his trigger from his map to my map and replaced his variables and units with mine, i really don't know what could have gone wrong
The only thing that I can think of, and GIMLI_2 has already mentioned it, is that your Unit Group is either null or empty. Unit Groups are objects, just like Units, and you need to create them besides just declaring their variables. Try increasing DG_GROUP (or KHeavens) array size to 24. This will create 25 Unit Group objects as soon as the map is initialized.
 
Level 17
Joined
Mar 21, 2011
Messages
1,597
The two images are the same, i dont see any difference ^^'
Anyway i just copied and pasted his trigger from his map to my map and replaced his variables and units with mine, i really don't know what could have gone wrong :(
I also tried to replace "Attacked Unit" with "Triggered Unit" but it still doesn't work. I also tried the debug message thing about the "Proc" trigger and no message is shown :(
they are different. check attacked unit - attacking unit
it looks quite the same
 
Level 3
Joined
Mar 22, 2020
Messages
46
View attachment 357527


The only thing that I can think of, and GIMLI_2 has already mentioned it, is that your Unit Group is either null or empty. Unit Groups are objects, just like Units, and you need to create them besides just declaring their variables. Try increasing DG_GROUP (or KHeavens) array size to 24. This will create 25 Unit Group objects as soon as the map is initialized.
Im an idiot, i added the unit to the wrong group -.-
It works now, thank you all for the help and for being spectators of my stupidity ^^'
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,503
Im an idiot, i added the unit to the wrong group -.-
It works now, thank you all for the help and for being spectators of my stupidity ^^'

Well, that Unit Group check doesn't necessarily make sense. I still don't fully understand what you want and you never answered my questions.

How exactly do you want the ability to function? As of now, and this was based on your original design, Divine Guidance will only work for units that belong to the owner of the Divine Guidance source.

Meaning, if Player 1 owns a Hero with Divine Guidance, only his units will become Invulnerable. Also, it's a global effect, meaning it doesn't matter where a unit is, it will benefit from this effect.

How EXACTLY do you want the ability to behave?
 
Level 3
Joined
Mar 22, 2020
Messages
46
Well, that Unit Group check doesn't necessarily make sense. I still don't fully understand what you want and you never answered my questions.

How exactly do you want the ability to function? As of now, and this was based on your original design, Divine Guidance will only work for units that belong to the owner of the Divine Guidance source.

Meaning, if Player 1 owns a Hero with Divine Guidance, only his units will become Invulnerable. Also, it's a global effect, meaning it doesn't matter where a unit is, it will benefit from this effect.

How EXACTLY do you want the ability to behave?
Well, actually i explained its functioning when i opened this thread ^^'
The range is not really problem but i need it to affect heroes owned by allied player too :)
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,503
I've asked several questions that your original post doesn't answer.

Anyway, the range is not really a problem? So you want it to be global then.

And this one's more of a design choice up to you:

Currently, if Player 1 has two units with Divine Guidance, and an ally goes below 20%, both of those unit's abilities will go on cooldown. Is this intentional? Or do you want it so only 1 of the units expends their cooldown?

And another question I asked earlier. How many units can have this ability per player?

Edit:
I uploaded what I believe should be exactly what you want. I removed the Array from the DG_Group as it wasn't necessary and I added a Boolean to prevent the Divine Guidance Proc from triggering for every single unit with the ability. It will now pick 1 unit with Divine Guidance at random and trigger their ability and ignore the rest.
  • Divine Guidance Proc
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Percentage life of (Attacked unit)) Less than or equal to 20.00
      • ((Attacked unit) is A Hero) Equal to True
      • ((Attacking unit) belongs to an enemy of (Owner of (Attacked unit)).) Equal to True
      • (Number of units in DG_Group) Greater than 0
    • Actions
      • Set VariableSet DG_Break = False
      • Unit Group - Pick every unit in DG_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Ability Cooldown Remaining of (Picked unit) for ability Divine Radiance ..) Less than or equal to 0.00
              • ((Attacked unit) belongs to an ally of (Owner of (Picked unit)).) Equal to True
              • DG_Break Equal to False
            • Then - Actions
              • Set VariableSet DG_Break = True
              • Unit - For Unit (Picked unit), start cooldown of ability Divine Radiance " over "10.00 seconds.
              • Trigger - Run Divine Guidance Shield <gen> (ignoring conditions)
            • Else - Actions
 

Attachments

  • Divine Guidance 2.w3m
    20.9 KB · Views: 39
Last edited:
Level 3
Joined
Mar 22, 2020
Messages
46
I've asked several questions that your original post doesn't answer.

Anyway, the range is not really a problem? So you want it to be global then.

And this one's more of a design choice up to you:

Currently, if Player 1 has two units with Divine Guidance, and an ally goes below 20%, both of those unit's abilities will go on cooldown. Is this intentional? Or do you want it so only 1 of the units expends their cooldown?

And another question I asked earlier. How many units can have this ability per player?

Edit:
I uploaded what I believe should be exactly what you want. I removed the Array from the DG_Group as it wasn't necessary and I added a Boolean to prevent the Divine Guidance Proc from triggering for every single unit with the ability. It will now pick 1 unit with Divine Guidance at random and trigger their ability and ignore the rest.
  • Divine Guidance Proc
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Percentage life of (Attacked unit)) Less than or equal to 20.00
      • ((Attacked unit) is A Hero) Equal to True
      • ((Attacking unit) belongs to an enemy of (Owner of (Attacked unit)).) Equal to True
      • (Number of units in DG_Group) Greater than 0
    • Actions
      • Set VariableSet DG_Break = False
      • Unit Group - Pick every unit in DG_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Ability Cooldown Remaining of (Picked unit) for ability Divine Radiance ..) Less than or equal to 0.00
              • ((Attacked unit) belongs to an ally of (Owner of (Picked unit)).) Equal to True
              • DG_Break Equal to False
            • Then - Actions
              • Set VariableSet DG_Break = True
              • Unit - For Unit (Picked unit), start cooldown of ability Divine Radiance " over "10.00 seconds.
              • Trigger - Run Divine Guidance Shield <gen> (ignoring conditions)
            • Else - Actions
I'll try to make it clear (if i forget something, feel free to ask):
- This ability is global
- It affects allied units and owner units that falls below 20% hp (this map is a MOBA like, so each player can control only their hero - the ability have to affect only heroes and not on summoned units and things like that)
- When off cooldown, this abilty should create a little effect ("overhead") on all the possible targets so that everyone know what to expect (obviously this effect disappear when the ability triggers - this is a thing i thought only now and was not in the original design)

p.s. Plz help me finish this, i am going crazy :c
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,503
Again, you aren't answering my questions... I can't help you properly if you won't do so.

Anyway, it's all finished besides the special effect part.

So I'll ask again, how many units can have this ability at a given time? Only 1? Multiple? I assume the reason you were using a Unit Group was to make the spell MUI.

Then refer to my previous post. Do you want it to function the way I described (if it does indeed work for multiple units)?

And if it's only one unit with Divine Guidance the special effect could be done doing something like this:

Create a Dummy unit and give it an Aura with a buff that applies the desired special effect. Have this aura target all Heroes, allies, and enemies and give it 999999 Area of Effect.

Then whenever Divine Guidance goes on cooldown, remove or disasble this Aura ability from the Dummy, and then X seconds later enable it again. You may want to pick every Hero in the map and remove the buff from them after disabling the aura, since buffs from auras linger for a couple of seconds. This will make the icon and special effect from the buff disappear at the correct time.

It would be best to use a Timer for re-enabling the Aura since timers are precise where as Waits are not. With a Wait there's a chance that the Aura gets enabled too early/too late.
 
Last edited:
Level 3
Joined
Mar 22, 2020
Messages
46
Again, you aren't answering my questions... I can't help you properly if you won't do so.

Anyway, it's all finished besides the special effect part.

So I'll ask again, how many units can have this ability at a given time? Only 1? Multiple? I assume the reason you were using a Unit Group was to make the spell MUI.

Then refer to my previous post. Do you want it to function the way I described (if it does indeed work for multiple units)?

And if it's only one unit with Divine Guidance the special effect could be done doing something like this:

Create a Dummy unit and give it an Aura with a buff that applies the desired special effect. Have this aura target all Heroes, allies, and enemies and give it 999999 Area of Effect.

Then whenever Divine Guidance goes on cooldown, remove or disasble this Aura ability from the Dummy, and then X seconds later enable it again. You may want to pick every Hero in the map and remove the buff from them after disabling the aura, since buffs from auras linger for a couple of seconds. This will make the icon and special effect from the buff disappear at the correct time.

It would be best to use a Timer for re-enabling the Aura since timers are precise where as Waits are not. With a Wait there's a chance that the Aura gets enabled too early/too late.
Which question im not aswering ? Can you rewrite them ?
I told you that each player owns only the hero (since is a MOBA like map) and so, Divine Radiance should affect my and allied heroes. Wasn't that what you asked to know ?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,503
MOBA's like League of Legends can have 2 of the same Hero in the same game so it's not really an answer to say "It's like a MOBA".

Anyway, from what I understand, you're saying that only 1 Hero will EVER have Divine Guidance, which changes everything. The Unit Group is entirely pointless now. I assumed you were using one, especially one with an Array because you wanted the spell to be MUI but I guess that wasn't the case.

You still haven't answered some of my questions but at this point I don't really care and it's not that important.

If you do what I said in my previous post with the Dummy you should be all set.

Edit: Oh, you can have up to 4. So it IS MUI. Alright, then I think the current triggers I made are fine.

The special effect can be done how I explained earlier but instead you should create 1 Dummy PER team and make it's ability only target Allies. You can create this Dummy upon learning the Divine Guidance ability for the owner of the Learning Hero, just make sure you only create it once per team (so add a condition: Level of learned hero skill equal to 1)

This way each team with the Divine Guidance ability will have their own Dummy granting them the Aura.

You can save this Dummy as a Unit variable (Array) that you can easily reference, like DG_Dummy[player number of Divine Guidance hero]. This will make it easy to disable/enable the Aura.
 
Last edited:
Level 3
Joined
Mar 22, 2020
Messages
46
MOBA's like League of Legends can have 2 of the same Hero in the same game so it's not really an answer to say "It's like a MOBA".

Anyway, from what I understand, you're saying that only 1 Hero will EVER have Divine Guidance, which changes everything. The Unit Group is entirely pointless now. I assumed you were using one, especially one with an Array because you wanted the spell to be MUI but I guess that wasn't the case.

You still haven't answered some of my questions but at this point I don't really care and it's not that important.

If you do what I said in my previous post with the Dummy you should be all set.

Edit: Oh, you can have up to 4. So it IS MUI. Alright, then I think the current triggers I made are fine.

The special effect can be done how I explained earlier but instead you should create 1 Dummy PER team and make it's ability only target Allies. You can create this Dummy upon learning the Divine Guidance ability for the owner of the Learning Hero, just make sure you only create it once per team (so add a condition: Level of learned hero skill equal to 1)

This way each team with the Divine Guidance ability will have their own Dummy granting them the Aura.

You can save this Dummy as a Unit variable (Array) that you can easily reference, like DG_Dummy[player number of Divine Guidance hero]. This will make it easy to disable/enable the Aura.
I said "its like a MOBA" for that exact reason, since you can have the same hero in each team, i thought it could clarify easily but it didn't, my bad.
I think we didn't understand each other from the beginning and that made us a little nervous and I'm sorry for this.

Anyway, i didn't understand the "dummy thing".
Can't i just use the special effetc trigger that you made ? Or maybe you were referring to the other special effect for the ability ? (the one when it is off cooldown)
Can't i just change some condition (or others triggers) to make in works on ally too ?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,503
I feel like you missed a bunch of my posts. I had already fixed all of those issues. The only thing that was missing was the Special Effect stuff since you told me about that later on.

Anyway, I attached a map with the special effect stuff implemented.

How to import into your map:
1) Delete everything you already have related to Divine Radiance (triggers, abilities)

2) Copy and paste all of the Divine Radiance abilities/buffs into your map

3) Copy and paste the Divine Radiance Triggers folder into your map (in the Trigger Editor)

4) Configure the Divine Radiance Setup trigger (in the Trigger Editor), it should look like this:
  • Divine Radiance Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet DR_Hero_Ability = Divine Radiance
      • Set VariableSet DR_Aura_Ability = Divine Radiance (Aura)
      • Set VariableSet DR_Aura_Buff = Divine Radiance (Aura Buff)
5) Configure the Waits/Timers to last however long you want. I made the Waits/Timers last 10.00 seconds for the Cooldown duration and the Wait last 3.00 seconds for the Invulnerability duration. So look through all of the triggers and edit them to last how long you want. 10.00 seconds is used for the Cooldown duration, and 3.00 seconds is used for the Invulnerability duration.

6) Finished.

There is a possible error that could occur depending on how your Teams are setup (the Forces that you made in the Scenario tab). I use the player's Team Number (0 = Team 1, 1 = Team 2, 2 = Team 3, 3 = Team 4) as the Index [] of the Timers.

If your Teams are setup in a way that the Players don't use these Team Numbers (Maybe Team 1 is used for Computers for example), then the triggers will break.

It's important that the first 4 Teams are used for the Players that have access to Divine Radiance. This is most likely the case already so everything SHOULD work fine.
 

Attachments

  • Divine Radiance.w3m
    23.2 KB · Views: 48
Last edited:
Level 3
Joined
Mar 22, 2020
Messages
46
I feel like you missed a bunch of my posts. I had already fixed all of those issues. The only thing that was missing was the Special Effect stuff since you told me about that later on.

Anyway, I attached a map with the special effect stuff implemented.

How to import into your map:
1) Delete everything you already have related to Divine Radiance (triggers, abilities)

2) Copy and paste all of the Divine Radiance abilities/buffs into your map

3) Copy and paste the Divine Radiance Triggers folder into your map (in the Trigger Editor)

4) Configure the Divine Radiance Setup trigger (in the Trigger Editor), it should look like this:
  • Divine Radiance Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet DR_Hero_Ability = Divine Radiance
      • Set VariableSet DR_Aura_Ability = Divine Radiance (Aura)
      • Set VariableSet DR_Aura_Buff = Divine Radiance (Aura Buff)
5) Configure the Waits/Timers to last however long you want. I made the Waits/Timers last 10.00 seconds for the Cooldown duration and the Wait last 3.00 seconds for the Invulnerability duration. So look through all of the triggers and edit them to last how long you want. 10.00 seconds is used for the Cooldown duration, and 3.00 seconds is used for the Invulnerability duration.

6) Finished.

There is a possible error that could occur depending on how your Teams are setup (the Forces that you made in the Scenario tab). I use the player's Team Number (0 = Team 1, 1 = Team 2, 2 = Team 3, 3 = Team 4) as the Index [] of the Timers.

If your Teams are setup in a way that the Players don't use these Team Numbers (Maybe Team 1 is used for Computers for example), then the triggers will break.

It's important that the first 4 Teams are used for the Players that have access to Divine Radiance. This is most likely the case already so everything SHOULD work fine.
Ok, I did everything but a trigger is missing a piece, how do i fix it ?

Edit: Also i wanted you to know (since, mistakenly, I took it for granted) that this ability doesn't need to be learned (like all the heroes ability) since is a passive ability avaiable since the beginning of the game. Does this changes something ? (i hope it doesn't)
 

Attachments

  • Missing.png
    Missing.png
    48.6 KB · Views: 67
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,503
The trigger that matters is the one that uses "A unit learns a skill". This is where I add the Aura and add the Hero to the Unit Group.

Since you won't be learning a Hero skill, you need to instead add the Aura/Add the Hero to the Unit Group at some other time. It depends on how the ability works, does a Hero start out with it?

If it does, then add the Aura/add the Hero to the Unit Group when it's first created.
 
Level 3
Joined
Mar 22, 2020
Messages
46
The trigger that matters is the one that uses "A unit learns a skill". This is where I add the Aura and add the Hero to the Unit Group.

Since you won't be learning a Hero skill, you need to instead add the Aura/Add the Hero to the Unit Group at some other time. It depends on how the ability works, does a Hero start out with it?

If it does, then add the Aura/add the Hero to the Unit Group when it's first created.
Okay, now it work as it should do :D
Thanks a lot and sorry again if I made you nervous in some way ^^'

P.s. the only thing that does not work is that the aura does not reactivate after the first time the ability triggers, do you have any idea how to solve it?
 
Level 13
Joined
May 10, 2009
Messages
868
P.s. the only thing that does not work is that the aura does not reactivate after the first time the ability triggers, do you have any idea how to solve it?
Your "Add to Group" trigger is assigning NULL to DR_Hero variable
  • Set VariableSet DR_Hero[(Team number of (Owner of (Triggering unit)))] = (Triggering unit)
So this fails
  • Player - Enable DR_Aura_Ability for (Owner of DR_Hero[(Integer A)])
Triggering Unit doesn't work with Timer events.

  • Set DR_Hero[(Team number of (Owner of Keeper of Heaves (Support) 002 <gen>))] = Keeper of Heavens (Support) 002 <gen>
Anyway, it looks like your spell only works for only 1 unit as of now.
 
Level 3
Joined
Mar 22, 2020
Messages
46
Your "Add to Group" trigger is assigning NULL to DR_Hero variable
  • Set VariableSet DR_Hero[(Team number of (Owner of (Triggering unit)))] = (Triggering unit)
So this fails
  • Player - Enable DR_Aura_Ability for (Owner of DR_Hero[(Integer A)])
Triggering Unit doesn't work with Timer events.

  • Set DR_Hero[(Team number of (Owner of Keeper of Heaves (Support) 002 <gen>))] = Keeper of Heavens (Support) 002 <gen>
Anyway, it looks like your spell only works for only 1 unit as of now.
Oh ok, I didn't notice that. Thanks :)

What Blood said. Also, I assume if your game is a Moba then there must be some Event for selecting a Hero. This is when you want want to setup Divine Radiance.
Yes, it is a Moba but im focusing on creating the heroes right now, character selection screens have yet to be made :)
 
Status
Not open for further replies.
Top