Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Setting Records

Hello everyone!

I'm creating a Harvest Moon type game for my wife, and have been plunking along figuring things out along the way. I am lost at the moment on how to create size records when fishing.

I currently have it so the variable for the fish size is generated when the location and type of fish is generated. This is all working correctly. The next calls that I have in the event is to set the record for that type of fish to fish size that was generated IF the fish size is bigger than the current record. That is also working.

The problem is, I don't know how to make it so the fish record stays at the current number that was just set without switching to the newly generated number for the fish size.

I know why it's doing what it is doing, however, I can't seem to understand a different way to event it to get the result I actually need.
 

LTN Games

Master Mind
Resource Team
Xy$
0.01
It's a bit hard to help without seeing exactly how you're going about it, maybe some screenshots? If it was me I would make a separate variable called "Highest Record" and another one named "current size" and then compare the two, if Currnt Size > Highest Record then set highest record to current size.
 
The problem is, I don't know how to make it so the fish record stays at the current number that was just set without switching to the newly generated number for the fish size.
I'm not sure I see the problem here.

Is var 15 changing away from the record?

As a side note whilst you're making this your wife should try Stardew Valley. You may not see her for like a day, or 300 :)
 
Basically I would like the record setting to work something like this.

-Run random variable for fish size.
-If variable fish size record is either 0 (before you catch any fish) or less than the randomly generated variable for fish size, then make fish size record equal to the randomly generated variable for fish size

(side note, I have this part working)

-Make it so fish size record stays the same number we just set it to (ie. if the random generated number was 2, it would be set at 2)
-Rerun the random variable for fish size.
-Once again run our conditional branch.

The issue that I have with my coding is that fish size record is set to be equal to the randomly generated variable for fish size. So when the randomly generated variable for fish size is ran again, the record changes with new number, even if that new number is less than the number we previously set.
 
Okay I've made a very small version of fishing the way I'd do it. See the link if you're interested.
This is how it plays out:
- I have an event listen for button presses it flicks a switch and doesn't let it reactivate unless it's not pressed in the meanwhile so the fishing happens whilst the button is pressed but I can control it.
- I have a blank event called Bubbles that I move when I define the water.
- I have a little code that randomises the fish size and makes it so that it's not pure chance it being a catchable size (10).
- When the player takes their hand off enter, it see's whether or not bubble state was 9 or higher, if so randomise a size for the fish, see if it's bigger than the record.
- Set the record, show text in all three cases, record, not record and no catch
- Reset bubble state



https://mega.nz/#!CU0gjALT!wqrGwsYx9N43qeWOkJGnwOnyVnDBA29Kps91gJXyoe8

My hope is that from seeing a way to do it, you might find your answer because I can't understand exactly what you're trying to do.

Unless the reason why is because you're jumping so much and just need to use a parallel event or two to make it work. IN which case this is perfect considering it uses only parallel events.
 
I'm still not understanding the problem. I may just pack it in and do some switches, really dumb down the system just to make sure it works.
 
Top