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

#1 2011-07-29 12:29:54

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Can a sprites position (X and Y) be set in a variable?

I cant explain this very well, but i was asking this because I wanted to use a block that looked like this:

[blocks]
<go to[<{  }> <{  }>]>
[/blocks]

Well, is it possible (sorry if the pictuire dosent display properly.)

Last edited by DigiTechs (2011-07-29 12:49:32)


I'm back.
Maybe.

Offline

 

#2 2011-07-29 12:48:44

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: Can a sprites position (X and Y) be set in a variable?

I help others, but they dont help me?


I'm back.
Maybe.

Offline

 

#3 2011-07-29 12:52:14

Idome
New Scratcher
Registered: 2011-07-17
Posts: 12

Re: Can a sprites position (X and Y) be set in a variable?

THis is how i would do it:
<when green flag clicked>
<forever>
<go to x sad  <{ X }> )y sad  <{ Y }>

And then Set the variables to sliders and control it by them

Offline

 

#4 2011-07-29 12:57:12

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: Can a sprites position (X and Y) be set in a variable?

Idome wrote:

THis is how i would do it:
<when green flag clicked>
<forever>
<go to x sad  <{ X }> )y sad  <{ Y }>

And then Set the variables to sliders and control it by them

I ment, in 1 variable.


I'm back.
Maybe.

Offline

 

#5 2011-07-29 13:05:33

Idome
New Scratcher
Registered: 2011-07-17
Posts: 12

Re: Can a sprites position (X and Y) be set in a variable?

I dont think its possible unless you want the sprite only to go up or down.

Offline

 

#6 2011-07-29 13:06:26

DigiTechs
Scratcher
Registered: 2011-04-30
Posts: 500+

Re: Can a sprites position (X and Y) be set in a variable?

D:


I'm back.
Maybe.

Offline

 

Board footer