Sup everyone, first post here so lemme know if this is the wrong place or anything.
So basically I am writing a super basic tinderbox looter, and I feel like there might be a better way to do things. Basically I need to loot a tinderbox, drop it, and continue that until there are 28 on the ground. Then I want to change state to start looting until my inventory is full, then bank yadda yadda. My first instinct was to create a boolean, and just set it to true when there's 28 boxes on the ground. Then use this in my state checks.
Is there a better way to do this? Essentially I need PICKUP_BOXES to persist until my inventory is full. I might just be totally blanking, here's my code for reference since my explanation probably sucked.
Any other advice is appreciated, I'm sure some of this looks fried lol but I am still figuring out the ins and outs of the api. Thanks guys.