So I made 4 attributes and don't want them to increase per level. I want the player to choose the way they stat, and the only way I've thought of besides abilities is using a dialog with 4 buttons corresponding to the right stat. The problem is, I can't find the right trigger(s) to add another point to the attributes when the button is clicked. I was able to take away 1 stat point (using vespene as stat points), but I can't add a point into the attribute. Anyone know a solution to this?
I have the exact same problem. I cannot seem to find any way to do this, but I am pretty sure it's possible. I would also greatly appreciate a solution to this problem!
This is what I also thought would work, however in my triggers it doesnt. :/
Here are my triggers:
(
Event - Player Any Player presses Attributes
Actions - Dialog - Display button 1 of size (150, 35) with text "Agility" at Bottom Right of screen with offset (110, 470) (run AgilityGain when button is clicked)
)
(
Actions - Unit - Add 1 Agility to Adam Carlfjord [90.00, 84.20] from player 1
)
This works as far as being able to press the button. However, no attribute gains are applied. :/
EDIT: Also, when i use this kind of function, the second trigger does not have any event. Therefore i cannot use "triggering unit" or anything like that. As you can see on my trigger the unit is a preset value, which i do not want because I want several different heroes to be able to use it -.-. Is there any way to fix this?
Make a new Buff Behavior.
1) Set Maximum Stack Count to 255 (or how much maximum limit your attribute has).
2) Peroid Count to 1.
3) Modification -> Behavior -> Attribute Changes -> Set your attribute 1
Then you can add x amount of this new behavior or remove them again.
To your edit: you would use a variable array to keep track of your players' heroes and use the player number as an index for the array.
So I made 4 attributes and don't want them to increase per level. I want the player to choose the way they stat, and the only way I've thought of besides abilities is using a dialog with 4 buttons corresponding to the right stat. The problem is, I can't find the right trigger(s) to add another point to the attributes when the button is clicked. I was able to take away 1 stat point (using vespene as stat points), but I can't add a point into the attribute. Anyone know a solution to this?
@peekuhchew: Go
I have the exact same problem. I cannot seem to find any way to do this, but I am pretty sure it's possible. I would also greatly appreciate a solution to this problem!
As the behavior you choose your attribute. This should increase the stat by 1.
This is what I also thought would work, however in my triggers it doesnt. :/
Here are my triggers:
(
Event - Player Any Player presses Attributes
Actions - Dialog - Display button 1 of size (150, 35) with text "Agility" at Bottom Right of screen with offset (110, 470) (run AgilityGain when button is clicked)
)
(
Actions - Unit - Add 1 Agility to Adam Carlfjord [90.00, 84.20] from player 1
)
This works as far as being able to press the button. However, no attribute gains are applied. :/
EDIT: Also, when i use this kind of function, the second trigger does not have any event. Therefore i cannot use "triggering unit" or anything like that. As you can see on my trigger the unit is a preset value, which i do not want because I want several different heroes to be able to use it -.-. Is there any way to fix this?
Ah, scuse me. I know now how it went:
Make a new Buff Behavior.
1) Set Maximum Stack Count to 255 (or how much maximum limit your attribute has).
2) Peroid Count to 1.
3) Modification -> Behavior -> Attribute Changes -> Set your attribute 1
Then you can add x amount of this new behavior or remove them again.
To your edit: you would use a variable array to keep track of your players' heroes and use the player number as an index for the array.
@s3rius: Go
I did what you said and my hero now starts with 1 agility instead of 0, but my trigger still does not work. :O
EDIT; Oh nevermind, I forgot to change the behavior in the trigger to the buff instead of the attribute. Thanks a bunch man! :D
Okay I got it to work, thanks! Quick question, is there a way to hide the buffs so I don't see it in my buff bar?
@peekuhchew: Go
yes. just enable the hidden flag in the buff itself.
sweet, thanks a lot :]