Computer Science Canada Space invaders aid! |
| Author: | Jorue [ Tue Dec 08, 2009 2:01 pm ] | ||
| Post subject: | Space invaders aid! | ||
What is it you are trying to achieve? Space Invaders game for my comp sci class What is the problem you are having? Bullets pass completely through the first row, then hit the enemy in the second row, doing what is should before crashing. Describe what you have tried to solve this problem I have looked over my variables and code and I haven't the slightest idea what is wrong. 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 2, I think. |
|||
| Author: | mirhagk [ Tue Dec 08, 2009 2:39 pm ] |
| Post subject: | RE:Space invaders aid! |
Turing 2??? go to www.holtsoft.com and download 4.1 or something. I don't really want to help you if you're using something that outdated |
|
| Author: | Jorue [ Tue Dec 08, 2009 2:41 pm ] |
| Post subject: | RE:Space invaders aid! |
Oh nonono. That's what I have then, this is on the school comps, and it was recently updated. I just wasn't sure, lol |
|
| Author: | mirhagk [ Tue Dec 08, 2009 2:45 pm ] | ||
| Post subject: | RE:Space invaders aid! | ||
oh okay lol, I was about to cry for you. Lol okay well first off that first procedure that passes in the ehit variable should really be a function. Here's what it'd be kinda like
|
|||
| Author: | Jorue [ Tue Dec 08, 2009 2:47 pm ] |
| Post subject: | RE:Space invaders aid! |
Could you show me how to edit that in? ;-; We aren't at that level. Lawl, I've never heard of a function. QQ |
|
| Author: | mirhagk [ Tue Dec 08, 2009 2:51 pm ] | ||||
| Post subject: | RE:Space invaders aid! | ||||
damn school. okay well a function is basically a procedure except it returns something. you call a procedure by typing
but you call a function by the following
|
|||||
| Author: | Superskull85 [ Tue Dec 08, 2009 3:08 pm ] | ||
| Post subject: | RE:Space invaders aid! | ||
Or you could just call "myfcn" within the put statement, and not store the return value in a variable:
|
|||
| Author: | mirhagk [ Tue Dec 08, 2009 3:10 pm ] |
| Post subject: | RE:Space invaders aid! |
but considering the fact that he's never heard of functions before, I figured storing it in a variable would be easier for him to understand. |
|
| Author: | Insectoid [ Tue Dec 08, 2009 6:17 pm ] |
| Post subject: | RE:Space invaders aid! |
Considering the fact that he's never heard of functions before, I figure it's high time he learned. |
|