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

#1 2011-05-03 15:49:51

goodtime41
New Scratcher
Registered: 2011-04-11
Posts: 8

How do I make a sprite do the actions of two buttons at once.....

...without having to press both buttons at once. I want to have one button move the sprite, and then while it's moving, you should be able to press another button that makes it rotate as it continues to move.

Offline

 

#2 2011-05-03 16:13:36

Sunrise-Moon
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: How do I make a sprite do the actions of two buttons at once.....

Don't use the [When Key Pressed] blocks. Instead, use the <if key [ ] pressed> sensors. For example, if you were to do this:
[forever]
[if <key [space] pressed>]
[change y by [5]]
[endif]
[if <key [right arrow] pressed>]
[change x by [5]]
[endif]
[endforever]
That would allow you to hold space and the right arrow at the same time to move diagonally up and to the right, or only hold space and still move up or only hold right arrow and still go to the right.


http://i1067.photobucket.com/albums/u427/HulKDzN/RebornBlade.png

Offline

 

Board footer