• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Setting the level of Item ability.

Status
Not open for further replies.

SpasMaster

Hosted Project: SC
Level 24
Joined
Jan 29, 2010
Messages
1,986
Hello guys!

I have a question about a triggered ability that I made. It's really simple and everything seems to be perfect, but as usual it isn't... Basically I made an ability based off on Roar [Called Avenging Wrath]. I edited the object editor field of the ability to give 25% bonus damage. That's working fine. With a trigger I add item abilities to the hero (Intelligence and Strength, Attack Speed and Armor.) and set their level to the level of the Roar ability. And when the Roar buff is gone, I remove them.

Here is what happens:
•The abilities are added properly.
•But they aren't set to the level of the Roar ability.

How to fix this? : /


Triggers:

[trigger="Avenging Wrath"]Avenging Wrath
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Avenging Wrath
Actions
Set AvengingWrath_Caster = (Triggering unit)
Set AvengingWrath_Ability[1] = Avenging Wrath Armor
Set AvengingWrath_Ability[2] = Avenging Wrath Atk Speed
Set AvengingWrath_Ability[3] = Avenging Wrath Stats
Unit - Add AvengingWrath_Ability[1] to (Triggering unit)
Unit - Set level of AvengingWrath_Ability[1] for (Triggering unit) to (Level of Avenging Wrath for (Triggering unit))
Unit - Add AvengingWrath_Ability[2] to (Triggering unit)
Unit - Set level of AvengingWrath_Ability[2] for (Triggering unit) to (Level of Avenging Wrath for (Triggering unit))
Unit - Add AvengingWrath_Ability[3] to (Triggering unit)
Unit - Set level of AvengingWrath_Ability[3] for (Triggering unit) to (Level of Avenging Wrath for (Triggering unit))
Trigger - Turn on Avenging Wrath 2 <gen>
Trigger - Turn off (This trigger)
[/trigger]

[trigger="Avenging Wrath 2"]Avenging Wrath 2
Events
Time - Every 0.50 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(AvengingWrath_Caster has buff Avenging Wrath ) Equal to True
Then - Actions
Else - Actions
Unit - Remove AvengingWrath_Ability[1] from AvengingWrath_Caster
Unit - Remove AvengingWrath_Ability[2] from AvengingWrath_Caster
Unit - Remove AvengingWrath_Ability[3] from AvengingWrath_Caster
Trigger - Turn on Avenging Wrath <gen>
Trigger - Turn off (This trigger)
[/trigger]
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Hello guys!

I have a question about a triggered ability that I made. It's really simple and everything seems to be perfect, but as usual it isn't... Basically I made an ability based off on Roar [Called Avenging Wrath]. I edited the object editor field of the ability to give 25% bonus damage. That's working fine. With a trigger I add item abilities to the hero (Intelligence and Strength, Attack Speed and Armor.) and set their level to the level of the Roar ability. And when the Roar buff is gone, I remove them.

Here is what happens:
•The abilities are added properly.
•But they aren't set to the level of the Roar ability.

How to fix this? : /


Triggers:

[trigger="Avenging Wrath"]Avenging Wrath
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Avenging Wrath
Actions
Set AvengingWrath_Caster = (Triggering unit)
Set AvengingWrath_Ability[1] = Avenging Wrath Armor
Set AvengingWrath_Ability[2] = Avenging Wrath Atk Speed
Set AvengingWrath_Ability[3] = Avenging Wrath Stats
Unit - Add AvengingWrath_Ability[1] to (Triggering unit)
Unit - Set level of AvengingWrath_Ability[1] for (Triggering unit) to (Level of Avenging Wrath for (Triggering unit))
Unit - Add AvengingWrath_Ability[2] to (Triggering unit)
Unit - Set level of AvengingWrath_Ability[2] for (Triggering unit) to (Level of Avenging Wrath for (Triggering unit))
Unit - Add AvengingWrath_Ability[3] to (Triggering unit)
Unit - Set level of AvengingWrath_Ability[3] for (Triggering unit) to (Level of Avenging Wrath for (Triggering unit))
Trigger - Turn on Avenging Wrath 2 <gen>
Trigger - Turn off (This trigger)
[/trigger]

[trigger="Avenging Wrath 2"]Avenging Wrath 2
Events
Time - Every 0.50 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(AvengingWrath_Caster has buff Avenging Wrath ) Equal to True
Then - Actions
Else - Actions
Unit - Remove AvengingWrath_Ability[1] from AvengingWrath_Caster
Unit - Remove AvengingWrath_Ability[2] from AvengingWrath_Caster
Unit - Remove AvengingWrath_Ability[3] from AvengingWrath_Caster
Trigger - Turn on Avenging Wrath <gen>
Trigger - Turn off (This trigger)
[/trigger]

I will agree with the above poster, these triggers are fine. Make sure those 3 abilites are not marked as Hero or Item abilities and that they have as many levels as Avenging Wrath with corresponding stats
 

SpasMaster

Hosted Project: SC
Level 24
Joined
Jan 29, 2010
Messages
1,986
I will agree with the above poster, these triggers are fine. Make sure those 3 abilites are not marked as Hero or Item abilities and that they have as many levels as Avenging Wrath with corresponding stats

After doing tons of fancy stuff, and testing stuff out it appears that it's just some kind of world editor bug.

However I found a way around it.

Instead of setting the level of the abilities to the level of Avenging Wrath, here is what I did. It works. :)

[trigger="Avenging Wrath"]Avenging Wrath
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Avenging Wrath
Actions
Set AvengingWrath_Caster = (Triggering unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of (Ability being cast) for (Triggering unit)) Equal to 1
Then - Actions
Set AvengingWrath_Ability[1] = Avenging Wrath Armor (L1)
Set AvengingWrath_Ability[2] = Avenging Wrath Atk Speed (L1)
Set AvengingWrath_Ability[3] = Avenging Wrath Stats (L1)
Unit - Add AvengingWrath_Ability[1] to (Triggering unit)
Unit - Add AvengingWrath_Ability[2] to (Triggering unit)
Unit - Add AvengingWrath_Ability[3] to (Triggering unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of (Ability being cast) for (Triggering unit)) Equal to 2
Then - Actions
Set AvengingWrath_Ability[1] = Avenging Wrath Armor (L2)
Set AvengingWrath_Ability[2] = Avenging Wrath Atk Speed (L2)
Set AvengingWrath_Ability[3] = Avenging Wrath Stats (L2)
Unit - Add AvengingWrath_Ability[1] to (Triggering unit)
Unit - Add AvengingWrath_Ability[2] to (Triggering unit)
Unit - Add AvengingWrath_Ability[3] to (Triggering unit)
Else - Actions
Trigger - Turn on Avenging Wrath 2 <gen>
Trigger - Turn off (This trigger)
[/trigger]

[trigger="Avenging Wrath 2"]Avenging Wrath 2
Events
Time - Every 0.50 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(AvengingWrath_Caster has buff Avenging Wrath ) Equal to True
Then - Actions
Else - Actions
Unit - Remove AvengingWrath_Ability[1] from AvengingWrath_Caster
Unit - Remove AvengingWrath_Ability[2] from AvengingWrath_Caster
Unit - Remove AvengingWrath_Ability[3] from AvengingWrath_Caster
Trigger - Turn on Avenging Wrath <gen>
Trigger - Turn off (This trigger)
[/trigger]
 
The (Level of (Ability being cast) for (Triggering unit)) Equal to 1 and soon really needs to convert to a looping instance for more accuracy and avoid long triggers...

Also, this AvengingWrath_Caster has buff Avenging Wrath ) Equal to True should be:

  • If - Conditions
  • (AvengingWrath_Caster has buff Avenging Wrath ) Equal to false
  • Then - Actions
    • Unit - Remove AvengingWrath_Ability[1] from AvengingWrath_Caster
    • Unit - Remove AvengingWrath_Ability[2] from AvengingWrath_Caster
    • Unit - Remove AvengingWrath_Ability[3] from AvengingWrath_Caster
    • Trigger - Turn on Avenging Wrath <gen>
    • Trigger - Turn off (This trigger)
 
Status
Not open for further replies.
Top