I have two items. One item gives 300 hp. The other item gives 350 hp bonus. The HP boost is a behavior. My problem is that the 300 and 350 stack but two of the same won't (non stack = good). How do I stop two different behaviors of the same property type (300 hp and 350 hp) from stacking?
Could you please briefly explain what exactly are validators and how they work in this specific case? I don't have a lot of experience working with them sadly.
This may sound silly, but is there a validator tutorial? I looked over the validator feature in the data editor and I was a little confused as to what I would do in the Unit Compare Behavior Count validator.
I see there is a behavior, compare, failure result, value, etc. What do I put in those fields to make it work? Let's assume the name of my behaviors are Health1 and Health2 (Health2 being the bigger one)
it's pretty self explanatory if you look at the validators. just make one that basically says if unit "target" has health 2 buff equals false
this will make it so that the behavior will check to make sure the validator is true, for it to apply. so if the target doesnt have health 2 buff it will apply itself, if it does have the health 2 buff, it wont. just mess around with it, it's easier than you think
(i was originally very intimidated by validators and i learned through trial and error, once u figure how one works the rest fall into place very easily)
In the modifications+ field of behaviors, under the behavior tab there is a field called "Behaviors Disabled". I take it you always want the strongest buff to be the one thats applied, so go to the strongest behavior you have and add all the weaker ones to that field, then go to the next best behavior and add all the ones weaker than it again.
Im not sure how many seperate buffs you have and how they are applied, but using validators will make it harder to make sure the right buff is applied. Using this method on the other hand takes longer to set up than a simple validator if you have a lot of behaviors.
I have two items. One item gives 300 hp. The other item gives 350 hp bonus. The HP boost is a behavior. My problem is that the 300 and 350 stack but two of the same won't (non stack = good). How do I stop two different behaviors of the same property type (300 hp and 350 hp) from stacking?
@Stormahawk: Go
Will disable the one you want cancled out.
if the other behavior is removed then it should start working again.
@SouLCarveRR: Go Yeah I don't want the 350 and 300 to stack.
Use a Unit Compare Behavior Count type validator that disables the lower one.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Thank you very much :)
Could you please briefly explain what exactly are validators and how they work in this specific case? I don't have a lot of experience working with them sadly.
add a validator to the 300 hp behavior, making it so it wont apply itself if the unit it's buffing is affected by the 350 hp buff.
This may sound silly, but is there a validator tutorial? I looked over the validator feature in the data editor and I was a little confused as to what I would do in the Unit Compare Behavior Count validator.
I see there is a behavior, compare, failure result, value, etc. What do I put in those fields to make it work? Let's assume the name of my behaviors are Health1 and Health2 (Health2 being the bigger one)
it's pretty self explanatory if you look at the validators. just make one that basically says if unit "target" has health 2 buff equals false
this will make it so that the behavior will check to make sure the validator is true, for it to apply. so if the target doesnt have health 2 buff it will apply itself, if it does have the health 2 buff, it wont. just mess around with it, it's easier than you think
(i was originally very intimidated by validators and i learned through trial and error, once u figure how one works the rest fall into place very easily)
http://www.sc2mapster.com/wiki/galaxy/data/validators/unit-compare-behavior-count/
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
So I did this:
Validator: Behavior: Health1
Compare: Equal to:
Failure Result: Must Target Unit
Validator result- Failure: error
I looked over the wiki, still somewhat confused.
And the value? you need your health 1 equal to what number?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@Stormahawk: Go
In the modifications+ field of behaviors, under the behavior tab there is a field called "Behaviors Disabled". I take it you always want the strongest buff to be the one thats applied, so go to the strongest behavior you have and add all the weaker ones to that field, then go to the next best behavior and add all the ones weaker than it again.
Im not sure how many seperate buffs you have and how they are applied, but using validators will make it harder to make sure the right buff is applied. Using this method on the other hand takes longer to set up than a simple validator if you have a lot of behaviors.
Thank you, I tried it out and it worked. I will have a lot of behaviors since I will have a lot of items but I can work with it.