Creating attribute that tracks other attributes

rrosario007rrosario007 Member, PRO Posts: 15

I have several game attributes that I want to have captured in one game attribute called "shotdecision". My game is a turn based game that requires shooting an actor "ball". Right now I'm trying to create an attribute that captures several other attributes to determine the best direction for a shot. For example: the actor "ball" can be shot to 6 different locations "buckets", and I want to create a rule that will decide which of the 5 locations is the best option. I've already created a mathematical expression that spits out a numerical value that will determine which location has the best shot. The lower the output of the expression the better the shot. However I cannot figure out how to convert this into an attribute/rule.

The tricky part is that out of the 6 locations, one is always a higher priority. I can't wrap my head around how to evaluate this decision using math, which I think is the key part to my problem.

I'm thinking something like
Rule, if att bucket1 is < 30
Change att.gamedecision to bucket 1

Rule, if att bucket2 is < 30
Change att.gamedecision to bucket 2

Rule if game bucket1 < bucket2
Change game.decision to bucket 1

This is clearly not the solution but it's where my mind is right now. Thoughts?

Sign In or Register to comment.