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

#1 2010-04-13 14:46:21

RacerZmanx1
Scratcher
Registered: 2009-01-01
Posts: 54

Ahhhhhhhhhhhhh

I am about to lose it. I've done all I can, thought of the most ridiculous bits of programming to overcome Scratch's various limits, but I can take it no longer.

IS THERE ANY WAY, ANY AT ALL, THAT I CAN GET SCRATCH TO RECORD A X/Y POSITION AS 3 DIGITS ALL THE TIME, AND NOT JUST WHEN IT REQUIRES IT?!

A 002 or a 000 or a 040 or a 078? Is that too much to ask from a programming language that has spanned the globe, made many complicated programs and can still be used by a 7-year old. IS IT?

Please...... someone help me!


Fight for what is good, fight against what is bad, and be as epic as the entire Pokemon series while doing so.

Offline

 

#2 2010-04-13 17:20:40

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Ahhhhhhhhhhhhh

OK! I have the answer.

Make this your code:

If <length of (mouse x) = 1>
add (join (join _ _) mouse x)

Do the same for mouse y.

Make it so if mouse x = w, add (join _ mouse x).


http://i46.tinypic.com/dw7zft.png

Offline

 

#3 2010-04-13 17:50:10

hmnwilson
Scratcher
Registered: 2007-07-04
Posts: 1000+

Re: Ahhhhhhhhhhhhh

I'm not sure what you want to do with negative numbers, but for the sake of simplicity, this'll only return a positive number.

http://www.freeimagehosting.net/uploads/8c560c1efc.gif
If you also want it to be able to make it negative, add this to each if block:
http://www.freeimagehosting.net/uploads/23e34888df.gif

Last edited by hmnwilson (2010-04-13 17:57:25)


I'm taking a break from Scratch until 2.0 comes out. Any messages sent between then and now probably won't be read - sorry.
(Oct. 20, 2011)

Offline

 

#4 2010-04-13 18:04:46

soupoftomato
Scratcher
Registered: 2009-07-18
Posts: 1000+

Re: Ahhhhhhhhhhhhh

Just put
Join <0><whatever you were using>


I'm glad to think that the community will always be kind and helpful, the language will always be a fun and easy way to be introduced into programming, the motto will always be: Imagine, Program, Share - Nomolos

Offline

 

#5 2010-04-13 18:39:05

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: Ahhhhhhhhhhhhh

SeptimusHeap's way is the best way to do it. hmnwilson's might work, but trig can  be confusing.


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#6 2010-04-13 19:20:38

hmnwilson
Scratcher
Registered: 2007-07-04
Posts: 1000+

Re: Ahhhhhhhhhhhhh

That doesn't use trig...

Just a simple join [0][x/y] block won't work if the X/Y position is only 1 digit.


I'm taking a break from Scratch until 2.0 comes out. Any messages sent between then and now probably won't be read - sorry.
(Oct. 20, 2011)

Offline

 

#7 2010-04-14 05:35:36

RacerZmanx1
Scratcher
Registered: 2009-01-01
Posts: 54

Re: Ahhhhhhhhhhhhh

I'll be more specific. I need a preferably short bit of code (as it's going to be repeated over 172800 times in the course of the program, and over that space of time, length of code is going to show) that will change ANY x/y position to 3 digits, NOT INCLUDING a minus sign. And what if the position is 0? Will it just display nothing? HELP!


Fight for what is good, fight against what is bad, and be as epic as the entire Pokemon series while doing so.

Offline

 

#8 2010-04-14 07:47:17

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: Ahhhhhhhhhhhhh

hmnwilson wrote:

That doesn't use trig...

Just a simple join [0][x/y] block won't work if the X/Y position is only 1 digit.

<abs( )> isn't trig?


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#9 2010-04-14 07:49:07

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Ahhhhhhhhhhhhh

RacerZmanx1 wrote:

I'll be more specific. I need a preferably short bit of code (as it's going to be repeated over 172800 times in the course of the program, and over that space of time, length of code is going to show) that will change ANY x/y position to 3 digits, NOT INCLUDING a minus sign. And what if the position is 0? Will it just display nothing? HELP!

Mine will work.


http://i46.tinypic.com/dw7zft.png

Offline

 

#10 2010-04-14 08:30:18

Phi_Lho
Scratcher
Registered: 2010-03-22
Posts: 75

Re: Ahhhhhhhhhhhhh

16Skittles wrote:

<abs( )> isn't trig?

No. It returns the absolute (positive) value of its argument, nothing to do with circles...


http://i241.photobucket.com/albums/ff159/PhiLho/KM150.pnghttp://i241.photobucket.com/albums/ff159/PhiLho/PhiLhoLogo.png

Offline

 

#11 2010-04-14 08:39:10

16Skittles
Scratcher
Registered: 2009-08-26
Posts: 1000+

Re: Ahhhhhhhhhhhhh

Oh... I should have known that. I know absolute value. but abbreviations can confuse me.


http://16skittles.tk/sig.png
Are you a student? Check out OnSchedule!

Offline

 

#12 2010-04-14 10:23:07

Greatdane
Scratcher
Registered: 2007-06-05
Posts: 1000+

Re: Ahhhhhhhhhhhhh

16Skittles wrote:

Oh... I should have known that. I know absolute value. but abbreviations can confuse me.

Well, you should know what it does by looking at it and playing around. I'm thinking you don't know trigonometry and just want to say a complex word?  tongue

In all reality, I am a thinker like SeptimusHeap, I encountered that same problem before and I did something close to what he did.

http://i43.tinypic.com/jufxhg.gif

Thanks goodness strings of text can be numbers. In Python or Java, they're completely separate.

Last edited by Greatdane (2010-04-14 10:23:23)


The future belongs to those who believe in the beauty of their dreams.
        ~ Eleanor Roosevelt

Offline

 

#13 2010-04-15 06:31:28

RacerZmanx1
Scratcher
Registered: 2009-01-01
Posts: 54

Re: Ahhhhhhhhhhhhh

Thanks everyone! Both SeptimusHeap's and GreatDane's ideas worked, but in the end I went for GreatDane's as I thought it was neater. Sorry hmnwilson, but that was just too long for my use of it.


Fight for what is good, fight against what is bad, and be as epic as the entire Pokemon series while doing so.

Offline

 

Board footer