Dividing values of enums
I'm not sure if I am asking this the right way but here it goes.
I have been following a tutorial series on youtube by bergzergarcade and I came across an issue I just cant cant figure out. The tutorial that covers what I'm referring to is here (https://www.youtube.com/watch?v=KG26blhtYnA&list=PLE5C2870574BF4B06∈dex=19)
Anyway my question refers to the below code:
GetSkill((int)SkillName.someskill).AddModifier(new ModifyingAttribute(GetPrimaryAttribute((int)AttributeName.AttributeName1), .33f));
GetSkill((int)SkillName.someskill).AddModifier(new ModifyingAttribute(GetPrimaryAttribute((int)AttributeName.AttributeName2), .33f));
GetSkill((int)SkillName.someskill).AddModifier(new ModifyingAttribute(GetPrimaryAttribute((int)AttributeName.AttributeName3), .33f));
The code "works" but it does not calculate "someskill" correctly.
If AttributeName1, AttributeName2, and AttributeName3 are each 100, "someskill" = 99 but I want it to 100 as well. I was wondering how I go about coding it so it calculates the 3 AttributeNames THEN divide by 3( or * .33)
I think nobody can answer this, because everything that's happening is in the methods you call which are not shown.I have no idea what's going on behind the curtains
Well like i said the code is "working" but ill try to give more information. I guess what Im wonder is, what is the best way to go about getting the remainder of each "AtttibuteName" to be included when calculating. Or in other words how can I combine those to give my code a single value to divide?
the mentioned video shows more code. Around the 7 $$anonymous$$ute mark (I think) and it will probably better explain whats going on than I can.
Your answer
Follow this Question
Related Questions
Switch Statement Gives Error PLEASE HELP!!! 2 Answers
Active and Inactive Spawn Points 0 Answers
How to divide big float 2 Answers
I Keep Getting Error CS0052 1 Answer