I am trying to create an ability which increases the strength of the caster by 10 for the duration of the ability.
The ability is based on Roar, the unit casts the ability, gains +50% bonus attack damage and +10 strength for 15 seconds. Only the caster is affected by the roar, so it no longer effects other units.
I am just wondering the best way to deal with the attribute element of the ability. Seeing as now you can edit the Attribute Bonus ability using triggers to increase / decrease the bonus, I am wondering whether it may be easier just to give every Hero a hidden Attribute Bonus ability and just edit the bonus each time using triggers.
Edit: So I was trying to do the trigger (It has been a few years since I have done any Warcraft 3 triggering) and I am having trouble getting the Attribute Bonus to remove the bonus strength after the Roar buff has been lost, all that seems to happen is the unit suddenly starts losing 10 strength every 0.1 seconds and then dies (bit weird). This is what I have so far:
The ability is based on Roar, the unit casts the ability, gains +50% bonus attack damage and +10 strength for 15 seconds. Only the caster is affected by the roar, so it no longer effects other units.
I am just wondering the best way to deal with the attribute element of the ability. Seeing as now you can edit the Attribute Bonus ability using triggers to increase / decrease the bonus, I am wondering whether it may be easier just to give every Hero a hidden Attribute Bonus ability and just edit the bonus each time using triggers.
Edit: So I was trying to do the trigger (It has been a few years since I have done any Warcraft 3 triggering) and I am having trouble getting the Attribute Bonus to remove the bonus strength after the Roar buff has been lost, all that seems to happen is the unit suddenly starts losing 10 strength every 0.1 seconds and then dies (bit weird). This is what I have so far:
-
RoarCast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Roar (Bear)
-
-
Actions
-
-------- Edit Units Attributes --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Triggering unit) has buff Roar (Bear)) Equal to False
-
-
Then - Actions
-
Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: Attribute Bonus )'s Integer Level Field: Strength Bonus ('Istr') of Level: 0 to ((Ability: (Unit: (Triggering unit)'s Ability with Ability Code: Attribute Bonus )'s Integer Level Field Strength Bonus ('Istr'), of Level: 0) + 10)
-
Unit - Increase level of Attribute Bonus for (Triggering unit)
-
Unit - Decrease level of Attribute Bonus for (Triggering unit)
-
-
Else - Actions
-
-
-------- - --------
-
-------- Add to R_UnitGroup --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Triggering unit) is in R_UnitGroup.) Equal to False
-
-
Then - Actions
-
Unit Group - Add (Triggering unit) to R_UnitGroup
-
-
Else - Actions
-
-
-------- - --------
-
-------- Turn on RoarTimer --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(RoarTimer <gen> is on) Equal to False
-
-
Then - Actions
-
Trigger - Turn on RoarTimer <gen>
-
-
Else - Actions
-
-
-
-
RoarTimer
-
Events
-
Time - Every 0.10 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in R_UnitGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) has buff Roar (Bear)) Equal to True
-
-
Then - Actions
-
Else - Actions
-
Ability - Set Ability: (Unit: (Picked unit)'s Ability with Ability Code: Attribute Bonus )'s Integer Level Field: Strength Bonus ('Istr') of Level: 0 to ((Ability: (Unit: (Picked unit)'s Ability with Ability Code: Attribute Bonus )'s Integer Level Field Strength Bonus ('Istr'), of Level: 0) - 10)
-
Unit - Increase level of Attribute Bonus for (Picked unit)
-
Unit - Decrease level of Attribute Bonus for (Picked unit)
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in R_UnitGroup) Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
-
-
Last edited: