This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.
  • Index
  •  » Suggestions
  •  » Change x/y of variable by ()/ Set x/y of variable to ()

#1 2012-03-16 12:58:12

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Change x/y of variable by ()/ Set x/y of variable to ()

set x of [variable v] to ( 0 )

set y of [variable v] to ( 0 )

change x of [variable v] by ( 10 )

change y of [variable v] by ( 10 )
Something like that would be nice you know?
Like in a fighting game or something:
when gf clicked
forever
   set x of [health v] to ( [x position v] of [player 1 v])
   set y of [health v] to ( ( [y position v] of [player 1 v]) + ( 30 ) )


Except that they would be orange like the variable blocks, or maybe blue?

Offline

 

#2 2012-03-16 13:11:38

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: Change x/y of variable by ()/ Set x/y of variable to ()

It's amazing how many times this has been suggested.

Anyway yeah, it'd be cool and stuff I guess, but you shouldn't really use variables for display anyway; they just look messy in my honest opinion. Use sprites instead.

Last edited by RedRocker227 (2012-03-16 13:12:24)


Why

Offline

 

#3 2012-03-16 14:10:04

turkey3
Scratcher
Registered: 2011-12-04
Posts: 500+

Re: Change x/y of variable by ()/ Set x/y of variable to ()

I support! Sometimes a variable just gets in the way.

Offline

 

#4 2012-03-16 14:55:59

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Re: Change x/y of variable by ()/ Set x/y of variable to ()

RedRobin227 wrote:

Anyway yeah, it'd be cool and stuff I guess, but you shouldn't really use variables for display anyway; they just look messy in my honest opinion. Use sprites instead.

I would prefer to use sprites, but I'm not sure how to use them to display several digit numbers.

Offline

 

#5 2012-03-17 00:54:20

MaxFlyboy
Scratcher
Registered: 2011-11-07
Posts: 100+

Re: Change x/y of variable by ()/ Set x/y of variable to ()

I think it would be useful for math projects that show the variables. because when they're uploaded, all the variable get stuck in the corner and you have no idea where they're getting the numbers from.


http://cdn.voodoofilm.org/images/upload/thumb/viral-video-2011.jpg click the picture for an AMV

Offline

 

#6 2012-03-17 15:51:49

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Change x/y of variable by ()/ Set x/y of variable to ()

This could be useful. I support.

Offline

 

#7 2012-03-17 16:06:30

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: Change x/y of variable by ()/ Set x/y of variable to ()

keroro645 wrote:

RedRobin227 wrote:

Anyway yeah, it'd be cool and stuff I guess, but you shouldn't really use variables for display anyway; they just look messy in my honest opinion. Use sprites instead.

I would prefer to use sprites, but I'm not sure how to use them to display several digit numbers.

It's actually nowhere near as hard as it looks. You can either have one sprite that stamps out the score, or you can have multiple sprites that each display a specified digit. I use the latter method in my latest project; you can download it and look at the scripts  smile


Why

Offline

 

#8 2012-03-17 22:45:34

keroro645
Scratcher
Registered: 2008-06-07
Posts: 1000+

Re: Change x/y of variable by ()/ Set x/y of variable to ()

RedRobin227 wrote:

It's actually nowhere near as hard as it looks. You can either have one sprite that stamps out the score, or you can have multiple sprites that each display a specified digit. I use the latter method in my latest project; you can download it and look at the scripts  smile

Yep, I noticed as soon as you first posted!
I totally forgotten about the new operator blocks and put them to use in my latest project.
Thanks.

Offline

 

#9 2012-03-17 22:51:27

CatPerson
Scratcher
Registered: 2011-12-17
Posts: 1000+

Re: Change x/y of variable by ()/ Set x/y of variable to ()

thatl be very useful, and, Is your username after the TV show SGT FROG?


http://nyopoliticker.files.wordpress.com/2012/02/in_dog_we_trust_rusty.jpghttps://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcSrxH2RAmte9adghivuoOhgklIlUcZUFuCAA0wFufFq-NWyZWg5http://www.buttonsonline.com/2012/obama/BO-rallysign-104.gif

Offline

 
  • Index
  •  » Suggestions
  •  » Change x/y of variable by ()/ Set x/y of variable to ()

Board footer