Discuss Scratch

maxhup010
Scratcher
57 posts

Variable Positioning

Hey!

I have been working on a couple of projects that use movable window designs for a UI and have ran into some problems with the large variable showing where a couple of simple blocks could help! (These blocks would act similar to SOME motion blocks)

(These blocks could be under a little dropdown in variables to prevent scaring new scratchers away from variables… or not, whatever)

movevariabletox:y:varxpositionvaryposition

Generally these blocks could be used to have a better UI that can change whilst still looking neat!


EDIT:
There are many other blocks people are suggesting for variables too!
So i created A MUCH BIGGER topic for you all: containing 7 possible blocks

HERE

Last edited by maxhup010 (May 30, 2016 10:09:41)

Sheep_maker
Scratcher
1000+ posts

Variable Positioning

I think only this block
setlocationofvartox:0y:0default values are sprite's current position
is necessary, assuming that the center of a variable reader is the top-left corner.

Last edited by Sheep_maker (May 29, 2016 04:20:59)

maxhup010
Scratcher
57 posts

Variable Positioning

Sheep_maker wrote:

I think only this block
setlocationofvartox:0y:0default values are sprite's current position
is necessary, assuming that the center of a variable reader is the top-left corner.
Yep. Agreed
A-KouZ1
Scratcher
100+ posts

Variable Positioning

Did you mean…? uses single variable for positioning?
woh that's easy workaround,

definesetpositiontoxaybsetpositiontoa+240mod480+b+160mod360*480

Well, if you want to read it, just do…

gotox:positionmod480-240y:floorofposition/480-180

Badly, forY Position, is does not support decimals

Last edited by A-KouZ1 (May 29, 2016 12:53:28)

ivancr72
Scratcher
100+ posts

Variable Positioning

A-KouZ1 wrote:

Did you mean…? uses single variable for positioning?
woh that's easy workaround,

definesetpositiontoxaybsetpositiontoa+240mod480+b+160mod360*480

Well, if you want to read it, just do…

gotox:positionmod480-240y:floorofposition/480-180

Badly, forY Position, is does not support decimals
No, it's “moving the variable”, not “storing a position on a variable”.
Breck-
Scratcher
100+ posts

Variable Positioning

Support for these:

movevariabletox:y:varxpositionvaryposition
maxhup010
Scratcher
57 posts

Variable Positioning

Breck- wrote:

Support for these:

movevariabletox:y:varxpositionvaryposition
Yeah… Whatever blocks, as long as they do the job.
rasmusolle
Scratcher
100+ posts

Variable Positioning

THOSE… BLOCKS…….. I CAN'T…. LIVE WITHOUT…… THEM…. ANYLONGER……
Austinato
Scratcher
1000+ posts

Variable Positioning

This is a good idea, and I support this.
Scratcher1002
Scratcher
1000+ posts

Variable Positioning

Breck- wrote:

Support for these:

movevariabletox:y:varxpositionvaryposition
A-KouZ1
Scratcher
100+ posts

Variable Positioning

ivancr72 wrote:

No, it's “moving the variable”, not “storing a position on a variable”.

Oh, I understand, somewhat like gliding variable thing, right?
defineglidevariabletox:xy:ybynsecssettemp xtovarxsettemp ytovarysettimecyctotimerrepeatuntiltimer>timecyc+nsetvar xtotempx+x-tempx*timer-timecyc/nsetvar ytotempy+y-tempy*timer-timecyc/ngotox:varxy:varysetvar xtoxsetvar ytoy

Could try it?
maxhup010
Scratcher
57 posts

Variable Positioning

A-KouZ1 wrote:

ivancr72 wrote:

No, it's “moving the variable”, not “storing a position on a variable”.

Oh, I understand, somewhat like gliding variable thing, right?
defineglidevariabletox:xy:ybynsecssettemp xtovarxsettemp ytovarysettimecyctotimerrepeatuntiltimer>timecyc+nsetvar xtotempx+x-tempx*timer-timecyc/nsetvar ytotempy+y-tempy*timer-timecyc/ngotox:varxy:varysetvar xtoxsetvar ytoy

Could try it?
No, ill try explain it in more detail, sorry if i sound patronising, i dont mean to be…

In scratch you can show a variable, but you have to drag it to where you want the information to be displayed… This is a massive limitation if you have multiple different screen layouts as you would have to base your layout around where the variable is… So if you could get a variable to go to a place on the screen (X & Y Coordinates) then you can have a User Interface that can adapt to the situation!

Hope that helps
awesome-llama
Scratcher
1000+ posts

Variable Positioning

Support, but duplicate topic.
A-KouZ1
Scratcher
100+ posts

Variable Positioning

maxhup010 wrote:

In scratch you can show a variable, but you have to drag it to where you want the information to be displayed… This is a massive limitation if you have multiple different screen layouts as you would have to base your layout around where the variable is… So if you could get a variable to go to a place on the screen (X & Y Coordinates) then you can have a User Interface that can adapt to the situation!

Hope that helps

Ah, I'm understand it now

Yeah, I need this block too,
Support!

anyway,
maybe I can suggest:
showvariableasslider
setpositionoflisttox:y:
setsizeoflisttowidthheight
nerdiebirdy
Scratcher
500+ posts

Variable Positioning

bump

Great idea! This would be useful for having a variable you want to appear in different areas of the screen.
Perhaps you could also add these:
changevariablexby
changevariableyby
j3r0_plays
Scratcher
100+ posts

Variable Positioning

No support, you can manually move em and use text engines and i know like 1000 workarounds. No.
scratch978654
Scratcher
100+ posts

Variable Positioning

Congrats on bumping a 4 year old topic.
Semi-support. In fact, 25% support.

You can just set variables to each other and move them to positions, or use your own text.

And if “your palette gets flooded”, then you can use lists. And if that gets flooded too, use say blocks.
A-KouZ1
Scratcher
100+ posts

Variable Positioning

Still 1000% support.
Text engine is expensive.
Using sprites is the waste of source.
It's better to have it for small projects.

I guess
wasdcoceoe
Scratcher
100+ posts

Variable Positioning

maxhup010 wrote:

Hey!

I have been working on a couple of projects that use movable window designs for a UI and have ran into some problems with the large variable showing where a couple of simple blocks could help! (These blocks would act similar to SOME motion blocks)

(These blocks could be under a little dropdown in variables to prevent scaring new scratchers away from variables… or not, whatever)

movevariabletox:y:varxpositionvaryposition

Generally these blocks could be used to have a better UI that can change whilst still looking neat!


EDIT:
There are many other blocks people are suggesting for variables too!
So i created A MUCH BIGGER topic for you all: containing 7 possible blocks

HERE
it's almost useless to me but it will be super useful to new scratchers so i support
cooldude-222
Scratcher
100+ posts

Variable Positioning

I support the
movemy variabletoX:Y:

Powered by DjangoBB