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

#1 2011-05-10 07:32:07

LordSydney
Scratcher
Registered: 2011-04-20
Posts: 100+

Some little help...

I need to have a script where a sprite moves up on a 5 level platform the level at the is the furthest away

-   -   -   -   -   -   -   -   -
-  -  -  -  -  -  -  -  -  -  -  -
- - - - - - - - - - - - - - - - - -
----------------------------------
_______________________

The sprite must when w pressed...move up a level and not go any further until the w key is repressed, same with down...I already have made a mode that works but it will keep moving... it would be great if you could help.


Need help with BBCode?
http://i.imgur.com/IfWrL.gifAlso check this out!http://i.imgur.com/YgF2v.gif

Offline

 

#2 2011-05-10 17:56:56

bdn7
Scratcher
Registered: 2010-07-10
Posts: 100+

Re: Some little help...

LordSydney wrote:

I need to have a script where a sprite moves up on a 5 level platform the level at the is the furthest away

-   -   -   -   -   -   -   -   -
-  -  -  -  -  -  -  -  -  -  -  -
- - - - - - - - - - - - - - - - - -
----------------------------------
_______________________

The sprite must when w pressed...move up a level and not go any further until the w key is repressed, same with down...I already have made a mode that works but it will keep moving... it would be great if you could help.

See, the human is imperfect, and what is happening here is you are holding w down too long, and it repeats. What you need to do is say if w pressed, move to platform, if w not pressed, if w pressed move to next platform.


http://i.imgur.com/Q7PiV.png
That's right. My text is BLUE.

Offline

 

#3 2011-05-10 18:21:24

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: Some little help...

bdn7 wrote:

LordSydney wrote:

I need to have a script where a sprite moves up on a 5 level platform the level at the is the furthest away

-   -   -   -   -   -   -   -   -
-  -  -  -  -  -  -  -  -  -  -  -
- - - - - - - - - - - - - - - - - -
----------------------------------
_______________________

The sprite must when w pressed...move up a level and not go any further until the w key is repressed, same with down...I already have made a mode that works but it will keep moving... it would be great if you could help.

See, the human is imperfect, and what is happening here is you are holding w down too long, and it repeats. What you need to do is say if w pressed, move to platform, if w not pressed, if w pressed move to next platform.

Almost.  It's close and I think you have it right, you just typed it wrong.

If key w pressed:
   go up one level
   wait until not ( key w pressed )
End If
If key d pressed:
   go down one level
   wait until not ( key d pressed)
End If

That should work for what you are doing...if I read what you wrote right.


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

#4 2011-05-10 21:58:41

bdn7
Scratcher
Registered: 2010-07-10
Posts: 100+

Re: Some little help...

AtomicBawm3 wrote:

bdn7 wrote:

LordSydney wrote:

I need to have a script where a sprite moves up on a 5 level platform the level at the is the furthest away

-   -   -   -   -   -   -   -   -
-  -  -  -  -  -  -  -  -  -  -  -
- - - - - - - - - - - - - - - - - -
----------------------------------
_______________________

The sprite must when w pressed...move up a level and not go any further until the w key is repressed, same with down...I already have made a mode that works but it will keep moving... it would be great if you could help.

See, the human is imperfect, and what is happening here is you are holding w down too long, and it repeats. What you need to do is say if w pressed, move to platform, if w not pressed, if w pressed move to next platform.

Almost.  It's close and I think you have it right, you just typed it wrong.

If key w pressed:
   go up one level
   wait until not ( key w pressed )
End If
If key d pressed:
   go down one level
   wait until not ( key d pressed)
End If

That should work for what you are doing...if I read what you wrote right.

Yeah, that's what I meant.


http://i.imgur.com/Q7PiV.png
That's right. My text is BLUE.

Offline

 

#5 2011-05-12 05:39:52

LordSydney
Scratcher
Registered: 2011-04-20
Posts: 100+

Re: Some little help...

hey thanks guys I was really brainstorming...also the computer crashed an I lost all my progress!  sad


Need help with BBCode?
http://i.imgur.com/IfWrL.gifAlso check this out!http://i.imgur.com/YgF2v.gif

Offline

 

#6 2011-05-12 05:46:31

ssss
Scratcher
Registered: 2007-07-29
Posts: 1000+

Re: Some little help...

sad   that5's not good -_-


Hey.  It's me SSSS, back from the dead!  smile

Offline

 

Board footer