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

#1 2011-11-21 11:44:00

wildwildcat
New Scratcher
Registered: 2011-06-01
Posts: 7

How to tell if within 10 mb?

Hello everyone, I was just wondering if it was possible to tell how many megabytes your project is without uploading it. Also, what exactly is compressing your project and how do you do it? Also, is there a script to tell how long you have pressed a button, I am making a space shooter game and would like to have a bullet that becomes more powerful to the longer you hold the shoot button but does not actually shoot until you are dine not pressing it.

Offline

 

#2 2011-11-21 12:09:47

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: How to tell if within 10 mb?

Hmm, about the 10mb limit, I'd actually agree there should be a way to do so. About the compressing, it's a way of "shrinking" your project so it will fit the 10mb limit. It reduces the quality of music and images. The button script, I like the idea but i'm not sure about the script for it.


I'm back.
Maybe.

Offline

 

#3 2011-11-21 12:12:07

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: How to tell if within 10 mb?

If you're using windows, find the folder that the .sb file is in, right-click on it and select 'Properties'. It will say how large the file is in kb, so you can use this converter to work it out it mb: http://www.t1shopper.com/tools/calculate/

Compressing a project is way of making your project a smaller file size; I'm not sure how it does it, but it's good to check the box if you think your project might be over 10mb.

For the last question, try this:

When green flag clicked
Forever
If touching mouse-pointer and mouse down
Reset timer
Wait until not touching mouse-pointer or not mouse down
Set 'Power' to timer
Shooting script here
End if
End forever

This makes it so the power is greater if the button is held for longer.

Hope I helped!  smile


Why

Offline

 

#4 2011-11-21 14:15:01

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: How to tell if within 10 mb?

Yes, just look at your file size to see if it is under 10MB.

Here is your script:
http://i42.tinypic.com/2ef8hnk.gif
This is how it works:
When the space button is pressed, it waits until it is released, or not pressed. While waiting, it also continually adds to a variable, the power, and if the power is over 20, it makes it 20 to limit it.
Then, it waits until it touches a color, dark red, (but you can make it when it's at a certain location or something, or a different color) and while waiting, it moves forward. The number of steps it moves is the variable that was just building up.
Then it waits a fifth of a second before going back to the start. And then it resets the power to 0.


Interactive demo: http://scratch.mit.edu/projects/staraptor3/2164444


NOTE: you may want to have multiple bullets. Tell me if you do.

Last edited by kayybee (2011-11-21 14:18:29)

Offline

 

#5 2011-11-21 21:44:38

wildwildcat
New Scratcher
Registered: 2011-06-01
Posts: 7

Re: How to tell if within 10 mb?

Thank you all for your work and help. As for the script I was thinking in timer and forgot variables. Thanks once more!

Offline

 

Board footer