I support JSO's suggestion of having Width and Heigth for sprites instead of Size (or other than Size). In this way it would be possible to manage elements (such as rectangles for example) creating animation effects that it would be very hard to create in a different way.
Offline
I agree. It'd be excellent to have
Offline
I agree completely. Just yesterday, I wanted to change the height of a sprite (the character that plays Farmer Brown and the CIA agent in the movie Cow Hunt Epilogue) without changing the width. That would be wonderful.
Offline
That would be awesome!
Offline
I Agree Like Mad!
Offline
Just imagine, a pin widthed scratch cat!
Offline
would it stretch in terms of X and Y or the sprites sides? So if it were rotated it would still look the same.
Offline
bigB wrote:
would it stretch in terms of X and Y or the sprites sides? So if it were rotated it would still look the same.
I would go for the sprites sides. I don't think there are cases in which X and Y would be more meaningful.
mrguy740 wrote:
I agree but it would be convenient if they still kept size
I do agree.
Offline
mrguy740 wrote:
I agree but it would be convenient if they still kept size
this would be helpful also as the hieght and width could be a percentage of the size.
Offline
I turned out that (obviously?) the possibility to change the x/y ratio (something related to what I was asking for) is already coded in scratch, simply it was hidden for unknown reasons (usally the Scratch Team try to make Scratch as simple and useful as possible and always coherent with Scratch's philosophy).
So, if you really want to experiment with it, you can create a new "stretch" block that will set to what percentage the x dimension relates to the y dimension. So, for example, by setting the stretch to 200% will cause the x-dimension of the sprite to be double with respect to the y-dimension. By combining size and streach I can reach the effect I needed.
For those that would like to bring the streach block back to Scratch, here you are some stepwise instructions adapted from Scratch source page and the amazing Jens' tutorial on how to add a new block.
How to start Scratch Source Code:
To get started:
- first copy the Scratch application ("Scratch.exe" or "Scratch.app") and the Scratch Plug-ins Mpeg3Plugin.dll and ScratchPlugin.dll from your normal Scratch folder into the Scratch source code folder. (The Scratch application is actually just a Squeak virtual machine, so any recent Squeak virtual machine should also work.)
- put a copy of the Squeak source code file in that folder ("SqueakV2.sources" you can download it from http://scratch.mit.edu/files/source-code/SqueakV2.sources)
- Finally, drop the file "ScratchSourceCode1.2.1.image" onto the Scratch application.
The Squeak programming environment will start up, allowing you to view and modify the Scratch source code.
How to create a new block (to make visible a command that already exists in Scratch):
- create a new change set:
- click on the background to bring up the "World" menu
- select "changes..."
- select "create new change set..."
- enter a name
- accept changes
- create a new block by defining a command spec
- in the System Browser select the class your new command block will address. Since the strech block will work with sprites, we'll choose their superclass:
- Scratch Objects
- ScratchSpriteMorph
- On the "class" side look for "blockSpecs" (hint: his method shows up by default)
- Read the instruction in the comment and edit in your new command spec:
| blocks |
blocks <- #(
'looks'
...
('set streach to %n%' - setStretchTo: 100)
...
- accept it (alt-s) and type your name
- finalize and share
- click on the background to bring up the "World" menu
- select "changes..."
- select "simple change sorter"
- select the name you choose for your change set
- right click and select "file out"
- test your block
- click on the background to bring up the "World" menu
- select "open..."
- select "Scratch"
- shift-click on the Extras button
- select "save image in user mode"
- select "yes"
- the Scratch window will close
- open Scratch again by double-clicking scratch.exe
Now you will find a new <set streach to __%> block in the "Looks" category. Enjoy!
Offline
It would be very difficult to make, but i think that i agree. We need a way to strech a sprite. not http://scratch.mit.edu/forums/viewtopic.php?id=6802#req_message
Offline
I support it, but maybe they could be called "stretch X" and "stretch Y" or something and the size block could stay.
Offline
Stretch is awesome
Offline
ssssttttrrrreeeettttcccchhhh rrrruuuulllleeeessss!!!!
Offline
Yes, that is a very good Idea! I can think of dozens of things that might be used for!
Offline
that would be awesome
Offline
I agree.
If enough people agree they might put it in. It could be a easy way to make, say, health bars with out having to make lots of costumes.
Offline