Pages: 1
If you're making a game that involves cash/gold, etc. how do you show your wealth or show another variable without using a variable? They have a really bad tendency to go to the default location if they need to be hidden/shown. I've seen many people do this and it really confuses me. I suppose I could see this if you make a sprite with 100 different costumes and a $99 limit, but this seems really inefficient.
Offline
No, not after you upload a project. Then everything seems to get messed up. After that, about every other time you open it up, the variables get messed up if they are not showing when you open it.
Offline
Well, you could have 1 sprite with 10 costumes, each with a digit 0-9 (in that order). Then make the following script:
forever:
go to x: 10
switch to costume: item (1) of (variable) - 1
go to x: 20
switch to costume: item (2) of (variable) - 1
etc.
Offline
Hardmath123 wrote:
switch to costume: item (1) of (variable) - 1
switch to costume: item (2) of (variable) - 1
DOES THAT WORK?
BREAKTHROUGH!
Offline
You guys Didn't know about that? You make the digit numbers and then you can stamp out the score at the top of the stage. If you want to use Panther, it has the a block to set the screen coordinates for a variable watchers as well as the watcher type (small, slider or large) and using this block by nXIII (block 22) you can actually change the watcher background to match the colour scheme of the game or even show a changing colour between red and green when something is loading!
Offline
I didn't know this!! Thanks!
Offline
Hardmath123 wrote:
forever:
go to x: 10
switch to costume: item (1) of (variable) - 1
go to x: 20
switch to costume: item (2) of (variable) - 1
etc.
item (1) of (variable) - 1 doesn't exist. there is, however, an item ( ) of (list)
Offline
qwerty2357 wrote:
Hardmath123 wrote:
forever:
go to x: 10
switch to costume: item (1) of (variable) - 1
go to x: 20
switch to costume: item (2) of (variable) - 1
etc.item (1) of (variable) - 1 doesn't exist. there is, however, an item ( ) of (list)
I think that is what Hardmath meant.
Offline
GraemeK wrote:
When you save the project, make sure that all of the variables are showing. They will stay in their allocated position this way. Hope this helps.
GraemeK
Qwerty2357 wrote:
No, not after you upload a project. Then everything seems to get messed up. After that, about every other time you open it up, the variables get messed up if they are not showing when you open it.
Well, I guess your suggestion was actually valid. What I meant was that not all of the variables could be shown at the same time in my game. I suppose I could rewrite it a bit so all of the variables are showing at the beginning of a game until you press the green flag.
Thank you for your efforts
Offline
floppy_gunk wrote:
qwerty2357 wrote:
Hardmath123 wrote:
forever:
go to x: 10
switch to costume: item (1) of (variable) - 1
go to x: 20
switch to costume: item (2) of (variable) - 1
etc.item (1) of (variable) - 1 doesn't exist. there is, however, an item ( ) of (list)
I think that is what Hardmath meant.
Or maybe letter (1) of (variable) - 1
Offline
floppy_gunk wrote:
qwerty2357 wrote:
Hardmath123 wrote:
forever:
go to x: 10
switch to costume: item (1) of (variable) - 1
go to x: 20
switch to costume: item (2) of (variable) - 1
etc.item (1) of (variable) - 1 doesn't exist. there is, however, an item ( ) of (list)
I think that is what Hardmath meant.
Unfortunately, I can't figure out how to make a variable show each digit in a list, i.e. if the number is 1,500,000, make a list:
List:
1
5
0
0
0
0
0
If I could do this, then it would probably work, but Idk how to.
Offline
qwerty2357 wrote:
floppy_gunk wrote:
qwerty2357 wrote:
item (1) of (variable) - 1 doesn't exist. there is, however, an item ( ) of (list)I think that is what Hardmath meant.
Unfortunately, I can't figure out how to make a variable show each digit in a list, i.e. if the number is 1,500,000, make a list:
List:
1
5
0
0
0
0
0
If I could do this, then it would probably work, but Idk how to.
You will need a list called list, and a variable called count.
set [count] to [0]
go to x: {start x} y: {start y}
repeat (length of [list])
change [count] by (1)
switch to costume (item (count) of [list])
change x by {width of costume}
stampThe costumes will have to be ordered 1-9, with 0 at the end. Anytime there is a {text}, replace text with the value.
Did that work?
Offline
Pages: 1