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

#1 2008-12-02 22:34:00

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

key selection

I have resently posted a project with very basic movment, up down left and right. the only diffrence is that in this project you can select which key you use to move with with a simple button. it has a easy interface to follow, simply press the up or down or left or right button andthe key you want to move with and it will work!
I posted this in the advance fourm because i doubt this has been done before. Please go ahead and download it and import it into your projects! http://scratch.mit.edu/projects/yambanshee/339158

Offline

 

#2 2008-12-02 22:43:09

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

Re: key selection

Wow that is a long script. Its not really worth putting into a normal project.

It would be good if you could put a variable into the pressing key block. So all you have to do to change keys is change a variable value. That is how people do it in flash. Being able to change keys in your projects is nice but its not work the effort or the processing power for all the needed if statements.


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 2008-12-03 05:36:09

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

Re: key selection

yea, its over 300 if statments, i think the file size is something like 250kb of pur scripting! this would only really be usefull in small games, but i have proven that scratch can take a load of scripts with lunar com, hitting way overthe 500 script count!

Last edited by yambanshee (2008-12-03 10:18:51)

Offline

 

#4 2008-12-03 09:40:24

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

Re: key selection

yambanshee wrote:

yea, its over 30 if statments, i think the file size is something like 250kb of pur scripting! this would only really be usefull in small games, but i have proven that scratch can take a load of scripts with lunar com, hitting way overthe 500 script count!

I think it proves how inflexible the language is.

I could probally script the same thing in flash with less than 20 lines of code which is less than 10% of your script.

I think that your project is nice, but not good for use in most projects.


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

 

Board footer