|
Post by manwitch on Apr 8, 2021 3:03:52 GMT
So I set up new enums and added to a new script, so I have the dynamic ints for the attribute events and everything works like intended, except I can't seem to figure out the right way to call the values from the new attributes.
This is the snippet I use so far and it works as intended except it (obviously) always sets to zero instead of the value assigned to the item attribute.
public void CurrentHunger(int value)
{
GetComponentInParent<InvectorAddOn>().HungerThirstElements.CurrentHunger = 0;
}
I can't figure out the correct syntax for after the "=" so it uses the item value instead of just setting it to zero. Every thing I've tried just returns errors.
Am I on the right track here, or way off base, or, or ... lol any help appreciated.
|
|
|
Post by manwitch on Apr 27, 2021 2:41:20 GMT
So to update, lol, I was way over thinking it I guess. It just need += value instead of = 0 to fix it.
|
|