Computer Science Canada Shoot multiple times |
Author: | turinghelp123 [ Wed May 14, 2014 8:53 pm ] | ||
Post subject: | Shoot multiple times | ||
What is it you are trying to achieve? <Make the program shoot multiple times> What is the problem you are having? <You can only shoot once then you have to wait till the bullet disappears to shoot again> Describe what you have tried to solve this problem <I've been trying to solve this for about 1 hour, and I've been having no luck> Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Please specify what version of Turing you are using <4.1> |
Author: | DemonWasp [ Wed May 14, 2014 9:27 pm ] |
Post subject: | RE:Shoot multiple times |
If you want to keep track of several things of the same type, you should look into arrays and records. Here's the Turing Walkthrough links: http://compsci.ca/v3/viewtopic.php?t=14333 http://compsci.ca/v3/viewtopic.php?t=9636 |
Author: | turinghelp123 [ Wed May 14, 2014 9:30 pm ] |
Post subject: | RE:Shoot multiple times |
What do you mean? How does this help shooting multiple times? |
Author: | Tony [ Wed May 14, 2014 11:03 pm ] |
Post subject: | RE:Shoot multiple times |
Right now you have only bullety. You want bullety_1, bullety_2, ..., etc. An array will let you group those related variables together, for much easier use. |
Author: | turinghelp123 [ Wed May 14, 2014 11:09 pm ] |
Post subject: | Re: RE:Shoot multiple times |
Tony @ Wed May 14, 2014 11:03 pm wrote: Right now you have only bullety. You want bullety_1, bullety_2, ..., etc. An array will let you group those related variables together, for much easier use.
Thanks tony, I just looked at arrays but I'm having trouble applying it to my program |