Help making temporary stat buff ability

V

Vigilant_Dea

Guest
I'm just trying to make an ability that will temporarily increase its targets stat by said amount per level...
For instance...
Level 1 - Increases Str by 5
Level 2 - Increases Str by 8
etc...

I tried making one out of bloodlust that used a trigger to add a dummy ability (item increase agi) but the level wouldn't affect the amount of stats increased.
I know I could make a seperate ability for each level but there must be an easier much more efficient way that wouldnt result in stacking the buff (if the person cast it, leveled it, then cast again...)

I'm sure someone has already done this before. I know defi4nc3s open rpg has skills that increase your stats using the +# after training them. I'm just wondering how it's done so I can make these buffs for my support class!

Thanks for any help,
~ Vigilant_Death ~
 

Cohadar

master of fugue
Reaction score
209
he he he,

of course you could not, it is an item ability.

You have to make separate ability for each level :banghead:

then add ability codes in a global array,

and then use add UnitAddAbility(hero, AbilityArray[level])
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
You have to make separate ability for each level :banghead:

Actually, you don't.
Make the attribute bonus 3 or 4 or how-many-do-you-want levels, then use:

Set level of (Ability) for (Unit) to (Integer)

after giving the ability to the Casting Unit. So it'll look like:

Add AttributeBonusAbility to (Casting Unit)
Set level of AttributeBonusAbility for (Casting Unit) to (Level of (AnotherAbility) of (Casting Unit))

This should work, assuming that you use 'A Unit Starts the effect of ability' as the event :D
 

NapaHero

Back from the dead...
Reaction score
43
Actually, you don't.
Make the attribute bonus 3 or 4 or how-many-do-you-want levels, then use:

Set level of (Ability) for (Unit) to (Integer)

after giving the ability to the Casting Unit. So it'll look like:

Add AttributeBonusAbility to (Casting Unit)
Set level of AttributeBonusAbility for (Casting Unit) to (Level of (AnotherAbility) of (Casting Unit))

This should work, assuming that you use 'A Unit Starts the effect of ability' as the event :D

He wants the target to have extra strength. So, it should be:

Code:
Events
     A unit starts the effect of an ability
Conditions
     (Ability Being Cast)) equal to <YourAbility>
Actions
     Unit - Add AttributeBonusAbility to (Target unit of Ability Being Cast))
     Unit - Set level of AttributeBonusAbility for (Target unit of Ability Being Cast)) to (Level of (<YourAbility>)) of (Triggering Unit))
 
V

Vigilant_Dea

Guest
He wants the target to have extra strength. So, it should be:

Code:
Events
     A unit starts the effect of an ability
Conditions
     (Ability Being Cast)) equal to <YourAbility>
Actions
     Unit - Add AttributeBonusAbility to (Target unit of Ability Being Cast))
     Unit - Set level of AttributeBonusAbility for (Target unit of Ability Being Cast)) to (Level of (<YourAbility>)) of (Triggering Unit))

Ok but one thing... Where do I get the AttributeBonusAbility. When I made an ability like that out of an item ability it would only work as level 1. I even added it to a hero and when you increased it's level it still didn't work.
 
V

Vigilant_Dea

Guest
Ok, I got it to work using an ability array and 10 different increase abilities...
I guess that is the only way since when you make an item ability the level does not work.

If there is a way to use just one ability please let me know because that would be much more efficient!
 

w00t22

CSS L4D DoD? Steam ID = w00t22
Reaction score
43
Heres a picture of attribute bonus ability under Neutral Hostile - Heros



Then do

Code:
Strenght Bonus
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Bloodlust
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Bloodlust for (Triggering unit)) Greater than or equal to (Level of Attribute Bonus for (Targeted unit))
            Then - Actions
                -------- The condition makes sure that you keep the highest skill up if some one has a lower level bloodlust. --------
                -------- So if the current buff is level 3 - 11 str, and the unit casts level 1 - 5 str, the targeteted uit keeps the 11 str buff --------
                -------- This makes sure this skill is non stackable --------
                Unit - Remove Attribute Bonus from (Triggering unit)
                Unit - Add Attribute Bonus to (Targeted unit)
                Unit - Set level of Attribute Bonus for (Targeted unit) to (Level of Bloodlust for (Triggering unit))
                Wait 15.00 seconds
                Unit - Remove Attribute Bonus from (Triggering unit)
            Else - Actions
 
V

Vigilant_Dea

Guest
That's awesome! Thank you very much.

One other thing... Is there a way to check under events for when a Unit loses a buff...
For instance with this skill I'm using bloodlust as the base skill for the stat bonus...

So can I check to see when a unit loses the effects of 'bloodlust'?

or will I have to make some weird triggers involving a huge array of timers...
 

w00t22

CSS L4D DoD? Steam ID = w00t22
Reaction score
43
like u mean, when he loses the buff he loses the str? i would use wait, but this skill is not mui, so it would screw up if u have more than 1 of these heroes, and the cooldown is shorter than the buff

heres the code to see if unit has, under condition for boolean

Code:
((Targeted unit) has buff Bloodlust) Equal to True
 
V

Vigilant_Dea

Guest
That says with (targeted unit) is there a way to check globally all units so the buff can be used easily?
 

N2o)

Retired.
Reaction score
51
That says with (targeted unit) is there a way to check globally all units so the buff can be used easily?

Pick Every Unit in (Region: Entire Map) and do:
Actions:

and take it from there, i dont have WE open so it's rough and you'll find it under unit groups and for this you need to replace (Targeted Unit) with (Picked Unit)
 

w00t22

CSS L4D DoD? Steam ID = w00t22
Reaction score
43
Code:
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
    Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Picked unit) has buff Bloodlust) Equal to True
            Then - Actions
                Do nothing
            Else - Actions
                Unit - Remove Attribute Bonus from (Picked unit)

? like that if he doesnt have the bloodlust it removes the str
 
V

Vigilant_Dea

Guest
EDIT : I just noticed page 2 and thank you guys very much for the help!
 
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