This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-02-04 16:38:04

trekkie2000
Scratcher
Registered: 2009-02-15
Posts: 100+

Variable categories

I've noticed when you have a game with a lot of variables, it gets difficult to keep track of them. What about this?
"Make new variable category"
And you can title it "Player one"
"Add new variable to category"
(pic here)
And your variables you be presented like this:

Player 1's variables
    (Player 1's) health
    (Player 1's) lives
    (Player 1's) points
Player 2's variables
   (Player 2's) health
   (Player 2's) lives
   (Player 2's) points
Other
   Time
   Level
   Etc
So when you set, say, player 1's health to visible, it would read "Health: X" not "Player 1's Health: X" This would be easier than just saying a variable for one sprite, because it's annoying to be making a multiplayer game where you want the hud to read
Player 1: Health: X Lives: X Points: X
And instead it reads
Player 1: Player 1's Health: X Player 1's Lives: X Player 1's Points: X


"If life gives you lemons, sell lemonade for $.25...
...Sell antidote to poison in lemonade for $250" -Me

Offline

 

#2 2012-02-04 16:42:12

Greenatic
Scratcher
Registered: 2009-05-03
Posts: 1000+

Re: Variable categories

trekkie2000 wrote:

Player 1: Health: X Lives: X Points: X
And instead it reads
Player 1: Player 1's Health: X Player 1's Lives: X Player 1's Points: X

I'm not quite sure I understand...which one do you want?

Offline

 

#3 2012-02-05 08:07:19

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Variable categories

Maybe you should use lists instead.

Offline

 

Board footer