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

#1 2010-09-19 12:43:14

dsharps
New Scratcher
Registered: 2010-09-19
Posts: 1

Parallel controls?

Making a tank combat game, but I can't get both tanks to move at once (one is on WASD controls, the other is arrow keys). Is there a way to have parallel control like that? I remember hearing something about being able to do it with a multi-core processor. I have a Core i7 on a Macbook Pro.

Offline

 

#2 2010-09-19 13:55:05

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: Parallel controls?

You should be able to get both tanks to move at once regardless of the processor you have! Try a script like this:

Code:

When Flag Clicked
{
        Forever
        {
                If(key "right arrow" pressed)
                {
                        change x by 5
                }
                If(key "left arrow" pressed)
                {
                        change x by -5
                }
                If(key "up arrow" pressed)
                {
                        change x by 5
                }
                If(key "down arrow" pressed)
                {
                        change x by -5
                }
        }
}

You can copy that to another tank and change the arrow keys to WASD.


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

Board footer