gaurdianAQ Member Posts: 106 From: Registered: 01-15-2007 |
why won't the text appear on the screen? I am no good with arrays yet |
||||||
Mene-Mene Member Posts: 1398 From: Fort Wayne, IN, USA Registered: 10-23-2006 |
I'll work on this later. ------------------ |
||||||
ArchAngel Member Posts: 3450 From: SV, CA, USA Registered: 01-29-2002 |
don't forget to tell us what language the code is in ------------------ |
||||||
Mene-Mene Member Posts: 1398 From: Fort Wayne, IN, USA Registered: 10-23-2006 |
Yeah, I usually put a " - BM/BB/B3d/B+/C++/..." at the end whatever's applicable. BTW, this is B3d. ------------------ |
||||||
gaurdianAQ Member Posts: 106 From: Registered: 01-15-2007 |
would it be better to learn torque? after I learn blitzbasic? | ||||||
Mene-Mene Member Posts: 1398 From: Fort Wayne, IN, USA Registered: 10-23-2006 |
Uh... I went onto BM. I can't help with Torque. You may also try C++ thats the industry standard. But, Matt Langely would be the one to ask on Torque. [This message has been edited by Mene-Mene (edited January 18, 2007).] |
||||||
samw3 Member Posts: 542 From: Toccoa, GA, USA Registered: 08-15-2006 |
Um, you're right you don't quite have array's yet. (no offense) According to your code ship\enemystring$ is a string "<O>" not an array: Const enemy$ = "<O>" Here's a quick analogy that helped me learn arrays a long time ago: Arrays are like post office boxes. The post office is the variable name. The PO Box number is the "index" of the array. So in basic you might have this code
'200' here is the number of nodes(PO Boxes) in the array To put something into one of the mailboxes.. say PO Box 120 you would:
To check a mailbox, PO Box 56 for example:
But to see the real power of arrays, how about the following example. Say you want to put a letter into all the boxes from PO Box 45 to 195
Here as 'i' changes through the loop, so does the PO Box that is referenced. This analogy does break down however in the following sense. Our array post office boxes can only hold one letter. So, in this example:
Grandma's 'letter' goes into oblivion and is replaced by the letter to Aunty. Does that help you understand arrays a little bit better? Multidimensional array work exactly the same way, except there are two numbers to address the node so:
are two different nodes. Just keep at it, you'll figure it out. ------------------ |
||||||
gaurdianAQ Member Posts: 106 From: Registered: 01-15-2007 |
well I had a working array before but I tryed changing it to make it move but then it got screwed up wait I know | ||||||
gaurdianAQ Member Posts: 106 From: Registered: 01-15-2007 |
ok I can't figure this out what i need is a code that will allow me to move an entire array of guys instead of just one | ||||||
gaurdianAQ Member Posts: 106 From: Registered: 01-15-2007 |
what I need is a way to use a type to place the array in a certain position and to move it I tryed using the text command but that puts all the text in that one spot is there a way so I can position an entire array with text? | ||||||
Mene-Mene Member Posts: 1398 From: Fort Wayne, IN, USA Registered: 10-23-2006 |
I'm confused at what you're asking. <BLOCKQUOTE><table width=80% border=0 bgcolor="#FFFFF" CELLPADDING="2" CELLSPACING="2"><TR><TD><font size="3" face="Courier" color="#000000"><pre>
for rows = 0 to RowAliennum ;Main loop for rows = 0 to RowAlienNum </pre></font></TD></TR></TABLE></BLOCKQUOTE> Its possible to do the above but its easier to do this.
this should work. ------------------ [This message has been edited by Mene-Mene (edited January 19, 2007).] |
||||||
gaurdianAQ Member Posts: 106 From: Registered: 01-15-2007 |
this does not work I get variable type mismatch | ||||||
gaurdianAQ Member Posts: 106 From: Registered: 01-15-2007 |
or expecting ) | ||||||
Mene-Mene Member Posts: 1398 From: Fort Wayne, IN, USA Registered: 10-23-2006 |
I don't know what's going on, I need to go to bed. maybe fresh eyes will see the problem. A hint, B3d & BM points you to the problematic line. ------------------ |
||||||
gaurdianAQ Member Posts: 106 From: Registered: 01-15-2007 |
I know I am using the trial of b3d | ||||||
Mene-Mene Member Posts: 1398 From: Fort Wayne, IN, USA Registered: 10-23-2006 |
Thats what I'm using as well. ------------------ |
||||||
gaurdianAQ Member Posts: 106 From: Registered: 01-15-2007 |
I don't think it can be done so for now I am going to use something else for my game or if it can be done it is something very complex | ||||||
Mene-Mene Member Posts: 1398 From: Fort Wayne, IN, USA Registered: 10-23-2006 |
Not really, usually after an error message It'll point your current selection to the problematic line. ------------------ |
||||||
gaurdianAQ Member Posts: 106 From: Registered: 01-15-2007 |
I figured it out it is unorthadox but it works | ||||||
gaurdianAQ Member Posts: 106 From: Registered: 01-15-2007 |
aaahhhh now its not working again now that I tryed to put it into my main program I guess this is to be expected in game design I am not used to programming games |