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

#1 2012-06-13 11:05:24

PhantomEXE
Scratcher
Registered: 2012-01-27
Posts: 27

Variables: Complex projects

Hello scratchers, veterans and noobs! I am the phantom.exe, and I'm making this forum because not enough people know about variables, and most of the people that do don't like using them for some reason.

READ THIS PART IF YOU READ NOTHING ELSE: If you are making a complex project, you will probably have at least 2 variables per sprite. I know that's a lot, but these orange numbers are as essential to projects of any level of complexity as command blocks.

Variables

A  variable is a value that can be set, changed, or even set to a word or letter (they really can, try it sometime). The most common use of a variable is as a score. The purpose of variables is to allow sprites to send messages to other sprites, the stage, or even themselves. An offensively complex sprite could have as many as 7 or more variables devoted solely to communicating with itself, and almost every single sprite I've ever made has had at least one variable. They are essential. If you have something to ask or say about variables, post here.


http://i1275.photobucket.com/albums/y460/Raxicorocorphallipatorius/RedStar_zps2d733aa2.gif?t=1363645062

Offline

 

#2 2012-06-13 11:06:32

PhantomEXE
Scratcher
Registered: 2012-01-27
Posts: 27

Re: Variables: Complex projects

If you want to know about operators, I'll make a forum for that too.


http://i1275.photobucket.com/albums/y460/Raxicorocorphallipatorius/RedStar_zps2d733aa2.gif?t=1363645062

Offline

 

#3 2012-06-13 11:16:28

Tbtemplex97
Scratcher
Registered: 2011-11-12
Posts: 100+

Re: Variables: Complex projects

With Extremely complex and large projects, including projects with stages and a menu system, you will have to a variable called "stage", "status" or "mode" these variables are essential as they are used for automatic background switching and game-mode switching, if you wish to see an example of "stage" variable, check out my escape project.


Online Status: http://blocks.scratchr.org/API.php?action=onlineStatus&user=Tbtemplex97
Darkspace Coming Soon!, Try the Singleplayer Demo

Offline

 

#4 2012-06-13 11:55:34

sonicfan12p
Scratcher
Registered: 2011-11-16
Posts: 1000+

Re: Variables: Complex projects

You should post examples in scratchblocks on how to use them! That might be more of a help to Scratchers than just explaining it.  smile


Why are the secret organizations getting all the attention?  mad

Offline

 

#5 2012-06-13 19:18:45

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: Variables: Complex projects

If only I'd seen this before I started playing around with Scratch. I once made a project (my first one that I deleted from my computer, I never uploaded it) that used costumes as variables. It got really tricky, but I was able to work it out.

Offline

 

#6 2012-06-13 19:23:28

Firedrake969
Scratcher
Registered: 2011-11-24
Posts: 1000+

Re: Variables: Complex projects

Would you please make a thread about lists?  Thanks.
~Firedrake969


Click the sign.
https://s3.amazonaws.com/eterna/eterna2/logo2.png

Offline

 

#7 2012-06-13 20:01:05

PhantomEXE
Scratcher
Registered: 2012-01-27
Posts: 27

Re: Variables: Complex projects

I'll look into lists. Wow, it's only been one day, and look how far this has come! Scratch really needed this.


http://i1275.photobucket.com/albums/y460/Raxicorocorphallipatorius/RedStar_zps2d733aa2.gif?t=1363645062

Offline

 

#8 2012-06-18 15:47:58

hart20
New Scratcher
Registered: 2012-06-12
Posts: 9

Re: Variables: Complex projects

Phantom.exe, maybe you can help me (a brand new Scratcher).  Is there a way I can write my variables to a txt file automatically (not with me having to click on the list and do it manually) either in Scratch, BOB or Panther.  I know that there is a "write __ to __ file" in Panther, but I can't seem to find the .txt file when I look for it later.

Offline

 

Board footer