Thanks for the video. When my ball bounces off the obstacle, it reverses its x direction heading. Therefore it is ineffective for bouncing off the side of the obstacle. Is there any simple way to remedy this?
This is an excellent question. Unfortunately, there is no simple remedy. One alternative, however, would be to create an obstacle that consists of multiple image sprites, and have the .collidedWith block update the GolfBall heading as appropriate. For example, if the ball collides with the obstacle in the x direction, the GolfBall heading should be updated to 180 - GolfBall.Heading. See the following screen shots for a push in the right direction. analytics.drake.edu/~urness/appcamp/blocks.png analytics.drake.edu/~urness/appcamp/blocks2.png analytics.drake.edu/~urness/appcamp/obstacle2.png
How did you get the "7" into the math block??? I double-clicked the "return" key on my keyboard to get a blank to put the number in, but how do I get it to the blue block??? Couldn't really tell in the video. You did it really quick.
In the blocks editor/viewer, make sure you click on the (white) background to ensure that nothing else has the focus. Then type in any number and press return -- the number in a blue "math" block should appear. If this doesn't work, you can always manually get a blue block by clicking on the "Math" block on the left hand side (under the built-in menu).
Thank you very much for this tutorial as it is very clear to understand you. However how do I get the reset button to work? I am a baby developer, nowhere near a junior developer so watching videos like yours actually gives me a visual learning hands on experience type of thing. Please help on the reset button. Or anyone. I would like the ball to disappear in the hole then re appear somewhere random on the screen. Thank You
Hello Timothy! Thanks so much for sharing this tutorial, your directions are very clear to understand! I do belive you forgot to program the RESET button to do what its suppose to do. Can you please make a video on," How to Swipe left/right and top/bottom to trigger something?"" The print version is here:- puravidaapps.com/snippets.php#2flung I am completely stuck on this one. I want to be able to swipe right or swipe left for the photos to show up. also how can you make a youtube video play inside the app? Thanks so much, any help will be greatly appreciated! David
The Z component is used to determine how elements should be layered relative to other objects. It is not used in collision detection. (ai2.appinventor.mit.edu/reference/components/animation.html)
Go to the ResetButton drawer and pull out the 'When ResetButton.Click' block. The interior of the reset button code will look very similar to the blocks inside the GolfBall.CollidedWith block at the end of the video. You'll just need to change the numbers for GolfBall.x and GolfBall.y so the position of the ball is changed to where you want it to be reset.
Thanks for the note, Ruby. The interior of the reset button code will look very similar to the blocks inside the GolfBall.CollidedWith block at the end of the video. You'll just need to change the numbers for GolfBall.x and GolfBall.y so the position of the ball is changed to where you want it to be reset.
Not a very good tutorial. This is really only good for the designer part of the game, the blocks and game its self is incomplete and very empty. Would not recommend using this video to help you make a mini golf app.