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
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top