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

#1 2009-01-12 09:15:57

BWOG
Scratcher
Registered: 2008-09-19
Posts: 1000+

if _ and _ pressed within _ secs block

it would make it alot easier to make games where you can double jump, do jumping attacks and other stuff. for example: if up arrow and up arrow pressed within 0.5 seconds. and somehow you can make it so it's longer so that it could be a secret code that you have to put in, like if 1 and 3 and 3 and 7 pressed within 5 seconds. you also would have to do them in that order, so if you did 3731 it would only count the 1 at the end.

Offline

 

#2 2009-01-12 11:12:44

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: if _ and _ pressed within _ secs block

You can already do that.

first have a timer, and check if the up arrow is pressed and that the timer isn't over .5 seconds.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#3 2009-01-12 16:11:40

bosox397
Scratcher
Registered: 2008-02-17
Posts: 1000+

Re: if _ and _ pressed within _ secs block

Kinda bounceing off this topic, I have always wanted a block that repeats for a certain time.

Like: repeat for _ secs


Dear Scratch Users,
I'm done with scratch, or at least making projects. I have made one last big game, thats both fun and teaches a lesson about water. It'd mean a lot if you gave me feedback.                              http://scratch.mit.edu/projects/bosox397/569201

Offline

 

#4 2009-01-12 16:38:29

BWOG
Scratcher
Registered: 2008-09-19
Posts: 1000+

Re: if _ and _ pressed within _ secs block

archmage wrote:

You can already do that.

first have a timer, and check if the up arrow is pressed and that the timer isn't over .5 seconds.

You would rather make stuff advanced and hard than make it simple and easy

Offline

 

#5 2009-01-12 17:16:33

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: if _ and _ pressed within _ secs block

BWOG wrote:

archmage wrote:

You can already do that.

first have a timer, and check if the up arrow is pressed and that the timer isn't over .5 seconds.

You would rather make stuff advanced and hard than make it simple and easy

Its easy enough. Scratch doesn't need more useless blocks.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#6 2009-01-12 18:21:56

golfer3
Scratcher
Registered: 2008-11-02
Posts: 1000+

Re: if _ and _ pressed within _ secs block

8-)

Offline

 

#7 2009-01-13 09:22:57

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: if _ and _ pressed within _ secs block

agree with arch mage, just use a variable to cheak weither he's jumping or not, and if he is and up is pressed again the varaible changes again so it doesint stay in the air...

Offline

 

#8 2009-01-13 15:24:10

bosox397
Scratcher
Registered: 2008-02-17
Posts: 1000+

Re: if _ and _ pressed within _ secs block

Yeah, you might not get it at first, but if u don't like that way, there are also other ways like creating a variable to tell how many jumps he's used and how many he has left


Dear Scratch Users,
I'm done with scratch, or at least making projects. I have made one last big game, thats both fun and teaches a lesson about water. It'd mean a lot if you gave me feedback.                              http://scratch.mit.edu/projects/bosox397/569201

Offline

 

#9 2009-01-13 16:52:50

bhz
Scratcher
Registered: 2008-07-06
Posts: 100+

Re: if _ and _ pressed within _ secs block

Oh. you want to double-jump?
http://scratch.mit.edu/projects/bhz/379989

Offline

 

#10 2009-01-13 18:54:44

big-bang
Scratcher
Registered: 2008-02-21
Posts: 1000+

Re: if _ and _ pressed within _ secs block

bosox397 wrote:

Kinda bounceing off this topic, I have always wanted a block that repeats for a certain time.

Like: repeat for _ secs

The
[blocks]<repeat(
<end>
[/blocks]
can work wonders if you want a timed script. Just use [blocks]<wait(  )secs>[/blocks] and a calculator. (Note: This is in Suggestions so I'll add a suggestion: make the wait [] secs block not say wait [] "secsc" in the forum code. It makes the blocks not work... AND the end is purple! What the heck?!

Last edited by big-bang (2009-01-13 18:55:47)


http://i47.tinypic.com/6edrbm.jpghttp://i45.tinypic.com/dw9hmw.jpghttp://i50.tinypic.com/f28tvn.jpghttp://i45.tinypic.com/ruwaop.jpg

Offline

 

Board footer