I think I understand. I can certainly see the outline of how powerful arrays might be and can think of several uses although I'm far from proficient enough to put it into practice.
Forgive my ignorance, guys. Your help is much appreciated.
Search found 111 matches
- Tue Jul 11, 2023 4:18 pm
- Forum: Newbie questions
- Topic: Confused About Tables
- Replies: 11
- Views: 3610
- Mon Jul 10, 2023 1:22 am
- Forum: Newbie questions
- Topic: Confused About Tables
- Replies: 11
- Views: 3610
Re: Confused About Tables
Check out this simple Hello World script: @DISPLAY{WIDTH = 960, HEIGHT = 540, MODE = "WINDOWED", TITLE = "Title", COLOR = #BLACK} SetFont(#SANS, 45) SetFontStyle(#ANTIALIAS) SetFontColor(#WHITE) _data = {30, 60, "One", 100, 250, "Two", 270, 400, "Three&qu...
- Fri Jul 07, 2023 10:13 pm
- Forum: Newbie questions
- Topic: Confused About Tables
- Replies: 11
- Views: 3610
Re: Confused About Tables
No more constants but the readibility is improved and you can process all the colors iterating the palette table, for example if you need to darken all the colors or you can also load/save the entire table from/to files :) Oh... So, the problem was the constant part? I was just somehow under the im...
- Sun Jun 25, 2023 9:30 pm
- Forum: Newbie questions
- Topic: Confused About Tables
- Replies: 11
- Views: 3610
Re: Confused About Tables
I've probably misunderstood the concept... again. Oh, well...
- Sun Jun 25, 2023 2:15 am
- Forum: Newbie questions
- Topic: Confused About Tables
- Replies: 11
- Views: 3610
Confused About Tables
In an exercise on how to work with arrays/ tables I thought I'd be able to store these constants: Const #TEXT_COL = $000020 Const #DECO_COL = $F08000 Const #PAPER_COL = $F0F0F0 Const #OPTS_LOCOL = $0050A0 Const #OPTS_HICOL = $D02020 More conveniently in a table like this: Dim Const #PALETTE = {$0000...
- Sun Jun 11, 2023 1:04 am
- Forum: Tutorials
- Topic: Block- Man Script
- Replies: 16
- Views: 9205
Re: Block- Man Script
That doesn't work as intended. If I reorganize them as follows: if Collision(#BRUSH, 1, BM_XPos, BM_YPos, 2, BL_Xpos, BL_Ypos ) = True and BM_Xpos =< BL_Xpos BM_XPos, BM_YPos = BL_XPos - 16, BM_YPos ; Handle collision with left side of obstacle DebugPrint("Hit The Left Side") elseif Collis...
- Fri Jun 09, 2023 12:23 am
- Forum: Tutorials
- Topic: Block- Man Script
- Replies: 16
- Views: 9205
Re: Block- Man Script
As far as I can tell each of the conditions do what they are supposed to, I just can't get them all to be considered. Just two at a time. I tested this by commenting out first the top two and then the bottom two.
- Thu Jun 08, 2023 7:53 pm
- Forum: Tutorials
- Topic: Block- Man Script
- Replies: 16
- Views: 9205
Re: Block- Man Script
So, I am trying to add some elements to this script. Namely adding a obstacle in the form of a 32x32 pixel square. I am using the following code: if Collision(#BRUSH, 1, BM_XPos, BM_YPos, 2, BL_Xpos, BL_Ypos ) = True and BM_Xpos =< BL_Xpos BM_XPos, BM_YPos = BL_XPos - 16, BM_YPos ; Handle collision ...
- Wed Dec 14, 2022 3:34 pm
- Forum: Tutorials
- Topic: Block- Man Script
- Replies: 16
- Views: 9205
Re: Block- Man Script
Brilliant! Thanks!
- Sun Dec 11, 2022 1:11 pm
- Forum: Tutorials
- Topic: Block- Man Script
- Replies: 16
- Views: 9205
Re: Block- Man Script
No worries.
Think I got it... So even though it defaults to 'True', saying: Flip(True) is better for readability(?)
Think I got it... So even though it defaults to 'True', saying: Flip(True) is better for readability(?)