User Tools

Site Tools


Sidebar

Torchmodders Site


Wiki Navigation

dynamic_stat_that_measures_the_level_of_a_skill

Dynamic stat that measures the level of a skill

by Soubenir

Original location

Let us say we have a SKILL named Hammer of the Gods which we want to attach to it a stat that measures the level of the skill.

We create a stat which I'll name GOD_HAMMER(FLOAT TYPE) and we go to the respective skill slot on the UI (your class name)_SKILL_TREE.LAYOUT and under the small plus button,next to the skill icon that allows us to level we add a STAT OPERATOR and point it to the stat GOD_HAMMER in the respective stat field, and mark the STAT OPERATOR as ADD, the FLOAT VALUE we Set to 0.5.

(need image here)

Then we create a new logic group under the plus button,and open it up,then we drag inside it the stat operator and the button.

(need image here)

Now we have to link the action of clicking the button with the stat operator. So we do the following: select the button inside the Logic group and on output tab that appears to the bottom left select CLICKED,the select the STAT OPERATOR and on Input Event on Top left Select OPERATE.

(need image here)

Now drag a line in the logic that connects the output of the button with the STAT OPERATOR input,you are good to go after that,save the UI and restart GUTS.

After that we attach the Stat on our character so we can monitor it by going to DATA EDITORS>UNITS>PLAYERS at first tab where it says STATS there must be a small field which says STATS.There we add our GOD_HAMMER Stat with the initial value we given it during its creation.

Now we can test this. Run GAME MODE in the Editor,and open PLAYER EFFECTS AND STAT WATCHERS Utility. Open up the skill menu and find the skill hammer of the gods. Level it up and you should see the stat GOD_HAMMER raise by one every time you tick the skill level up button.

dynamic_stat_that_measures_the_level_of_a_skill.txt · Last modified: 2015/04/03 06:36 by phanjam