Step Tracker Help

How would I make it so that every time I start the game a random amount of steps is given?
I know I need a randomizer, but I need to make sure the stuff I already have from @EggNoodle 's guide matches up with that randomizer. Like which property do I plug in, stepsState or Steps? And what should I change/delete/add?

I assume after the steps run out, the player won’t be able to move.
Wire a lifecycle with the event “Game Start” to a item granter, with settings “Event Occurs > Run wire pulse”.
image
Click on the Item Granter device, go to Blocks, and click on “On wire pulse”.


Follow the code:

This should give the player a random amount of, for this scenario, Bait.
Now, add a movement meter that tracks the amount of bait you have, and you’re done.

2 Likes

Solution 1 (most obvious)

Steps is the actual amount of steps the player has taken so you would want to compare that in a trigger using block code to your randomly generated number of steps.

Solution 2 (most memory efficient)
The number of steps you can take is… nvrm eggnoodle already said it.

To add onto his solution you will also want to change the block code inside the trigger 9999999 - stepState to be the random number instead of 999999. You will have to store it as a number property in the granting code.

2 Likes