Could someone give me an explanation on how to move sprites left and right and at a different level? Here's a better explanation. So if you split the calculator screen in to 4 sections. And there a 3 sprites, sprite A, B, and C.
Code:
How would you make it so that sprite A will move left and right continuously unless it is hit by sprite C. Then how would you make it so that after sprite A is hit by sprite C, it will spawn again randomly in section 1, 2, or 3. Also after, how do you make it so that the sprite that moves left and right will also change into either sprite A or sprite B after it is hit by sprite C. I know in TI-BASIC that you could simply use rand int commands but I have no idea how you would do that in C. Thanks to anyone who helps me with this. Please feel free to ask any questions because I'm sure it's probably hard to understand what I'm trying to say. Thanks.
-TheGeekyScientist
That table didn't turn out very well. Here's another.
http://imgur.com/g4x6qAq
edit: Table fixed and post merged by Alex
Code:
|---------------------------------|
| 1 |
|---------------------------------|
| 2 |
|---------------------------------|
| 3 |
|---------------------------------|
| |
|---------------------------------|
How would you make it so that sprite A will move left and right continuously unless it is hit by sprite C. Then how would you make it so that after sprite A is hit by sprite C, it will spawn again randomly in section 1, 2, or 3. Also after, how do you make it so that the sprite that moves left and right will also change into either sprite A or sprite B after it is hit by sprite C. I know in TI-BASIC that you could simply use rand int commands but I have no idea how you would do that in C. Thanks to anyone who helps me with this. Please feel free to ask any questions because I'm sure it's probably hard to understand what I'm trying to say. Thanks.
-TheGeekyScientist
That table didn't turn out very well. Here's another.
http://imgur.com/g4x6qAq
edit: Table fixed and post merged by Alex