I have a student that wants to create a type of app in App Lab where the characters has a flashlight which will reveal certain things as the game progresses. He would like the flashlight to become larger at times and have multiple levels.
Can anyone lead me in a direction as to what code could make this possible?
That sounds like an interesting type of game. I imagine it would involve using some collision blocks or isTouching blocks so if the flashlight were touching a specific object, it would be revealed.
I think the first step would be for him to make a simple level where he could experiment around with those different blocks / code and see how far he is able to get on his own.
Then, if he runs into a problem, check back in. I would suggest tackling one issue at a time. Don’t worry about the sizes until he can achieve the reveal effect he is after.
Just wondering where to find if touching or collision blocks in App Lab? I see similar in Game Lab but this student is creating in App Lab. Does it have to be entered in script as opposed to blocks?
I’m sharing a copy of his work. He wants to add a flashlight image that will move around and reveal the cat. Project
Sorry. I misread the original post and was thinking of Game Lab. Checking for collisions in App Lab is different. I believe you would have to manually compare the x and y position of the two objects using a conditional to see if they are close enough to each other for a collision to be happening.
It is harder to make something like this in App Lab, I would think.
Here’s a game of pong I found that checks collisions between the ball and the paddle. I believe most of the collision code is at the very end of the program. It could help, but I haven’t broken it down yet to see exactly how it works other than I know it’s making position comparisons.