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

#1 2011-09-15 16:33:22

zippolulu
Scratcher
Registered: 2010-05-04
Posts: 9

how to jump but not moving up (y direction) level 2

In level 1 in my game the character moves y and x. In level 2 I want my character to jump which she does but she still moves both in x and y directions, I want to be able to move in x and jump but cut the going y from level 1.
How do I "cut" the y movement without disturbing the y movement from level 1?
Thanks:zippolulu

Offline

 

#2 2011-09-15 19:38:59

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: how to jump but not moving up (y direction) level 2

I really don't know what you mean by "cutting" the y value, but I think this is something like what you want. Just make sure to have a "level" variable that is equal to the level you're on.

Code:

When green flag clicked
forever
    [other movement scripts]
    if <level = 1>
        [script that "cuts" y]

http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

Board footer