Blog Post
KatieChapman569
Community Member
Love this David! How on earth did you stop the character from going out of bounds?!
DavidMcEachan-f
4 years agoCommunity Member
Thanks Katie! I used a variable to track the Bee's position. You set the variable to 0, and then each time you press up or down, it adds/subtracts 1 from the variable. You can then specify that the Bee only moves when the variable is within a certain limit.
I used an 8x8 grid to keep track of the position, and the bee starts off on the fourth square down (based on the invisible grid). So, if you press down 4 times to reach the bottom, the position variable will be -4. Then it's just a simple matter of adding a trigger which reads:
MOVE Bee (on motion path) WHEN user presses the Down Key IF position is greater than or equal to -3.
Hope that makes sense!
I used an 8x8 grid to keep track of the position, and the bee starts off on the fourth square down (based on the invisible grid). So, if you press down 4 times to reach the bottom, the position variable will be -4. Then it's just a simple matter of adding a trigger which reads:
MOVE Bee (on motion path) WHEN user presses the Down Key IF position is greater than or equal to -3.
Hope that makes sense!
- KatieChapman5694 years agoCommunity MemberAh that's so clever! Thanks so much for explaining, David.
- TANIARANGEL3 years agoCommunity MemberHi David, how do you record the screen and then see it in the results?