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

#1 2012-08-02 12:13:32

Seil
Scratcher
Registered: 2011-09-02
Posts: 100+

Previous X and Y position block

It surprises me that no one has suggested this yet.

But anyways, my suggestion is to have two more reporter blocks that tells you the x or y position of the current sprite at the previous step.

This could easily be embedded into a stack block, for example:

go to x: (previous x position) y: (previous y position)
OR                    (Ignore the variable reporters, they're supposed to be motion reporters)
set [example v] to (previous y position)
Of course, this can easily be accomplished using variables, like in Paddle2SeeFixIt's project:
http://scratch.mit.edu/projects/Paddle2SeeFixIt/188825

But I think it would be a lot more convenient to have, especially since procedures will be a new feature in Scratch 2.0.

Please leave feedback!

Last edited by Seil (2012-08-02 12:15:09)


http://legacy-cdn.smosh.com/smosh-pit/022011/spongebob-gif-lol.gif

Offline

 

#2 2012-08-02 12:14:40

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

Re: Previous X and Y position block

Lightnin wrote:

Nice idea! But we’re reluctant to add features that Scratchers can make using the current blocks. It might be a little tricky, but I’m pretty sure you could write a script that would do this. Try asking Scratchers for help making one in the “Help with Scripts” forum.

Nope.  It can be achieved by other blocks.


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

Offline

 

#3 2012-08-02 12:19:13

Wes64
Scratcher
Registered: 2011-08-19
Posts: 1000+

Re: Previous X and Y position block

Its very simple to achieve the same result using lists or variables.


Experienced 2.0 Tester: Ask me questions!
Using Firefox 13.0, Flash plugin version 11.4.402.287, and Windows XP Professional.

Offline

 

#4 2012-08-02 12:26:39

Seil
Scratcher
Registered: 2011-09-02
Posts: 100+

Re: Previous X and Y position block

Firedrake969 wrote:

Lightnin wrote:

Nice idea! But we’re reluctant to add features that Scratchers can make using the current blocks. It might be a little tricky, but I’m pretty sure you could write a script that would do this. Try asking Scratchers for help making one in the “Help with Scripts” forum.

Nope.  It can be achieved by other blocks.

Thanks for the feedback, by the way.

Of course it can be achieved with other blocks, but consider this:

Can't the "change variable by [ ]" block be achieved by other blocks?
You can use the "set variable to [ ]" block to change the variable by a relative value. You can achieve this by putting together a block that says:

set [example v] to ((example) + (5))
5 would be the relative value it changes by.

I would assume they added the change block for more convenience.


http://legacy-cdn.smosh.com/smosh-pit/022011/spongebob-gif-lol.gif

Offline

 

#5 2012-08-02 14:59:24

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

Re: Previous X and Y position block


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

Offline

 

#6 2012-08-02 15:26:10

Seil
Scratcher
Registered: 2011-09-02
Posts: 100+

Re: Previous X and Y position block

Wow.
I never really had the time to think about all the workarounds for a lot of the blocks. Lol.

I guess we could just stick to the workaround for previous x and y, even though it would be a lot more convenient to have its own block. I got the idea from GML (Game Maker Language. I also sometimes use Game Maker.) Of course, with procedures being an upcoming feature, we wouldn't really have to worry about having to duplicate a whole portion of a script. I really hope we can export procedures. Lol.


http://legacy-cdn.smosh.com/smosh-pit/022011/spongebob-gif-lol.gif

Offline

 

#7 2012-08-02 15:30:10

berberberber
Scratcher
Registered: 2012-03-08
Posts: 1000+

Re: Previous X and Y position block

You can add it to your backpack.

Also, procedures are stack block only.


http://i47.tinypic.com/2iaa73k.png

Offline

 

#8 2012-08-02 15:38:12

Seil
Scratcher
Registered: 2011-09-02
Posts: 100+

Re: Previous X and Y position block

Whoa, wuut?

What's a backpack?

-- I mean, I know what the real-world thing is, but what's the backpack you're talking about?


http://legacy-cdn.smosh.com/smosh-pit/022011/spongebob-gif-lol.gif

Offline

 

#9 2012-08-02 15:41:28

Seil
Scratcher
Registered: 2011-09-02
Posts: 100+

Re: Previous X and Y position block

berberberber wrote:

Also, procedures are stack block only.

I'm not sure what you mean...
Does this mean you can't have stack blocks with arguments?

(Oh, sorry for double posting. I'm kinda new here.)

Last edited by Seil (2012-08-02 15:42:25)


http://legacy-cdn.smosh.com/smosh-pit/022011/spongebob-gif-lol.gif

Offline

 

#10 2012-08-02 15:54:02

HafenGames
New Scratcher
Registered: 2011-12-11
Posts: 6

Re: Previous X and Y position block

What you can do is make a list of x and y positions...

Offline

 

#11 2012-08-02 16:02:04

berberberber
Scratcher
Registered: 2012-03-08
Posts: 1000+

Re: Previous X and Y position block

No, it means that you can't have booleans or reporters.

The backpack is smething that stores the sprite/script inside, kind of like exporting.  Read the blog.


http://i47.tinypic.com/2iaa73k.png

Offline

 

#12 2012-08-02 16:16:38

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: Previous X and Y position block

Sorry, but a simple change detector and 2 variables will do this just fine. It'll be more convenient, but I don't think it's necessary.  hmm


http://i50.tinypic.com/312u714.jpg

Offline

 

Board footer