gaurdianAQ Member Posts: 106 From: Registered: 01-15-2007 |
I am wondering why won't this array work I am using blitz3D and I followed the tutorial except made a few changes it says out of bounds or something like that Graphics 800,600 Dim alien$(rows,columns) For rows = 0 To 2 For columns = 0 To 14 alien$(rows,columns) = FindChar$(rows) Next Next For rows = 0 To 2 For columns = 0 To 14 Write alien$(rows,columns) Next Next Function FindChar$(i) |
|
Mene-Mene Member Posts: 1398 From: Fort Wayne, IN, USA Registered: 10-23-2006 |
I think there is a small misunderstanding. I'm not sure what you're trying to do, but you have to define a array like this. Array(1,1) The numbers define how many rows and columns. It was an illustration as for rows an columns. I'll do my best to give you my interpretation of the code you're doing.
I had some real use for this technique. Making 300 squares by hand is tiring so I built this program. I also use it for rotating models and saving them as bmps to create 3d illusions. ------------------ |
|
gaurdianAQ Member Posts: 106 From: Registered: 01-15-2007 |
how could I transfer this into a space invaders style of thing I came up with the code to move the aliens I just need the code to draw them and I think I can figure out the rest | |
gaurdianAQ Member Posts: 106 From: Registered: 01-15-2007 |
I think I want a multidimensional array | |
Mene-Mene Member Posts: 1398 From: Fort Wayne, IN, USA Registered: 10-23-2006 |
Thats all you need to draw them above. It draws them. At least it should, I'll check. Edit: I don't understand whats wrong with it. ------------------ [This message has been edited by Mene-Mene (edited January 17, 2007).] |
|
gaurdianAQ Member Posts: 106 From: Registered: 01-15-2007 |
I got it so it shows the rows but now I need to somehow get them to move I have not figured out how yet | |
Mene-Mene Member Posts: 1398 From: Fort Wayne, IN, USA Registered: 10-23-2006 |
Put them in a type. ------------------ |
|
gaurdianAQ Member Posts: 106 From: Registered: 01-15-2007 |
I did that I think and I used the text command | |
Mene-Mene Member Posts: 1398 From: Fort Wayne, IN, USA Registered: 10-23-2006 |
Use the type loop to move them all. ------------------ |
|
gaurdianAQ Member Posts: 106 From: Registered: 01-15-2007 |
what is the type loop how do I use that? | |
gaurdianAQ Member Posts: 106 From: Registered: 01-15-2007 |
is that the for each next loop? | |
gaurdianAQ Member Posts: 106 From: Registered: 01-15-2007 |
can you demonstrate how this would look? with <O> being the alien? | |
Mene-Mene Member Posts: 1398 From: Fort Wayne, IN, USA Registered: 10-23-2006 |
fixed now. [This message has been edited by Mene-Mene (edited January 18, 2007).] |
|
gaurdianAQ Member Posts: 106 From: Registered: 01-15-2007 |
um this code does not work? I tryed modifying it to see if I could get it to work but no dice |