how do i use conditional statements to add some difficulty, such as having the HappyImage move faster or slower, or having the background colors change depending on the location of the HappyImage on the screen and adding new image sprites, use conditionals to change the face image displayed in a single image sprite.
This is what I have so far
Welcome Cayden.
In App Inventor, Index in a List is never zero.
I changed it, but I still need help with understanding how to change the face progression, any tips?
Perhaps use a Canvas to 'move' the image instead of attempting to manipulate position of image on your Screen using coordinates.
Creating Animated Apps
Yeah but it not really the goal we are trying to get to. it should as the happy face approaches an edge, the background color changes to serve as a warning. Design Needs Modify existing blocks.
Do
- Use conditional statements to add some difficulty, such as having the HappyImage move faster or slower, or having the background colors change depending on the location of the HappyImage on the screen.
- Use coordinates or math, but keep in mind that coordinates might limit the playability to only your device.
The same thing for the face progression.
Are you still stuck? Here is an example that shows one way of progressing a sprite across a Canvas. The background changes color depending on the sprite's distance from the right and left edges. Not exactly what you hope to do but it might give you some ideas as to solve your Project goals using an accelerometer with similar code. Solves the coordinates issue by always setting the Canvas pixels H x W as 505 x 320.