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

#1 2008-09-13 03:29:39

jamopop
Scratcher
Registered: 2008-07-30
Posts: 100+

how do I record inputs?

I really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really need to know how!(really)


"Life is a video game. No matter how good you get, you always end up getting zapped." -Shiregu Miyamoto

Offline

 

#2 2008-09-13 03:34:16

jamopop
Scratcher
Registered: 2008-07-30
Posts: 100+

Re: how do I record inputs?

[blocks]<when green flag clicked>[/blocks]
[blocks]<set[ input recording ]effect to(100 [/blocks]


"Life is a video game. No matter how good you get, you always end up getting zapped." -Shiregu Miyamoto

Offline

 

#3 2008-09-13 04:26:01

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: how do I record inputs?

What kind of input are you trying to record?  The mouse?  Sound?  Typing?

It would help if you would give us some details of what you are trying to do.  Thanks.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#4 2008-09-13 05:51:00

jamopop
Scratcher
Registered: 2008-07-30
Posts: 100+

Re: how do I record inputs?

Paddle2See wrote:

What kind of input are you trying to record?  The mouse?  Sound?  Typing?

It would help if you would give us some details of what you are trying to do.  Thanks.

well... mouse!

Last edited by jamopop (2008-09-13 05:53:17)


"Life is a video game. No matter how good you get, you always end up getting zapped." -Shiregu Miyamoto

Offline

 

#5 2008-09-13 09:47:54

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: how do I record inputs?

jamopop wrote:

Why wont anyone reply not even andresmh will  sad   sad   sad   sad   sad   sad

Some of us are still waking up!

To record the mouse position, create two lists, one for X and one for Y, let's call them X_Positions and Y_Positions.  Then, you can record the mouse postion with this script

When Space Pressed
delete all of X_Positions
delete all of Y_Positions
Repeat Until (Mouse Down?)
     Add (Mouse X) to X_Positions
     Add (Mouse Y) to Y_Positions

This script will start recording when the space bar is pressed and stop when the mouse button is clicked.

To play it back, first create a variable called Index, then try this script

When P Pressed
Set Index to 1
Repeat (Length of X_Positions)
       Go To (Item (Index) of X_Positions), (Item(Index) oif Y_Positions)
       Change Index by 1

Hope that helps!


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#6 2008-09-14 03:35:07

kokolol
Scratcher
Registered: 2008-09-11
Posts: 5

Re: how do I record inputs?

Paddle2See wrote:

jamopop wrote:

Why wont anyone reply not even andresmh will  sad   sad   sad   sad   sad   sad

Some of us are still waking up!

To record the mouse position, create two lists, one for X and one for Y, let's call them X_Positions and Y_Positions.  Then, you can record the mouse postion with this script

When Space Pressed
delete all of X_Positions
delete all of Y_Positions
Repeat Until (Mouse Down?)
     Add (Mouse X) to X_Positions
     Add (Mouse Y) to Y_Positions

This script will start recording when the space bar is pressed and stop when the mouse button is clicked.

To play it back, first create a variable called Index, then try this script

When P Pressed
Set Index to 1
Repeat (Length of X_Positions)
       Go To (Item (Index) of X_Positions), (Item(Index) oif Y_Positions)
       Change Index by 1

Hope that helps!

Hmm... nope but thanks for trying!

Offline

 

#7 2008-09-14 03:36:28

kokolol
Scratcher
Registered: 2008-09-11
Posts: 5

Re: how do I record inputs?

kokolol wrote:

Paddle2See wrote:

jamopop wrote:

Why wont anyone reply not even andresmh will  sad   sad   sad   sad   sad   sad

Some of us are still waking up!

To record the mouse position, create two lists, one for X and one for Y, let's call them X_Positions and Y_Positions.  Then, you can record the mouse postion with this script

When Space Pressed
delete all of X_Positions
delete all of Y_Positions
Repeat Until (Mouse Down?)
     Add (Mouse X) to X_Positions
     Add (Mouse Y) to Y_Positions

This script will start recording when the space bar is pressed and stop when the mouse button is clicked.

To play it back, first create a variable called Index, then try this script

When P Pressed
Set Index to 1
Repeat (Length of X_Positions)
       Go To (Item (Index) of X_Positions), (Item(Index) oif Y_Positions)
       Change Index by 1

Hope that helps!

Hmm... nope but thanks for trying!

remember im jamopops second user!

Offline

 

#8 2008-09-29 03:18:23

jamopop
Scratcher
Registered: 2008-07-30
Posts: 100+

Re: how do I record inputs?

paddle2see wrote:

Some of us are still waking up!

To record the mouse position, create two lists, one for X and one for Y, let's call them X_Positions and Y_Positions.  Then, you can record the mouse postion with this script

When Space Pressed
delete all of X_Positions
delete all of Y_Positions
Repeat Until (Mouse Down?)
     Add (Mouse X) to X_Positions
     Add (Mouse Y) to Y_Positions

This script will start recording when the space bar is pressed and stop when the mouse button is clicked.

To play it back, first create a variable called Index, then try this script

When P Pressed
Set Index to 1
Repeat (Length of X_Positions)
       Go To (Item (Index) of X_Positions), (Item(Index) oif Y_Positions)
       Change Index by 1

Hope that helps!

What do you put after the: Repeat (Length of X_Positions)
       Go To (Item (Index) of X_Positions), (Item(Index) oif Y_Positions)
       Change Index by 1?


"Life is a video game. No matter how good you get, you always end up getting zapped." -Shiregu Miyamoto

Offline

 

#9 2008-09-29 05:06:41

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: how do I record inputs?

jamopop wrote:

What do you put after the: Repeat (Length of X_Positions)
       Go To (Item (Index) of X_Positions), (Item(Index) oif Y_Positions)
       Change Index by 1?

I don't think you have to put anything, that's the whole script. 

Code:

When Key P Pressed     /* Set it up so when the P key is pressed */
                        
Set Index to 1              /* Initialize the item number to the first item in the lists */

Repeat (Length of X_Positions)   /* Loop through all the items in the list */

        /* Move the sprite to each X,Y position stored in the lists */

       Go To (Item (Index) of X_Positions), (Item(Index) of Y_Positions)

       Change Index by 1  /* Change the item number by one */

/* End of the Repeat loop */

I have made a sample project here, if you want to see it in action

http://scratch.mit.edu/projects/Paddle2SeeFixIt/278126


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#10 2008-10-08 20:08:28

ppppr
Scratcher
Registered: 2008-10-08
Posts: 1

Re: how do I record inputs?

hi

Offline

 

#11 2008-10-10 02:27:49

jamopop
Scratcher
Registered: 2008-07-30
Posts: 100+

Re: how do I record inputs?

ppppr wrote:

hi

hi!


"Life is a video game. No matter how good you get, you always end up getting zapped." -Shiregu Miyamoto

Offline

 

Board footer