Another newbie question: how do I make a label moveable?

How do I make a text bar move? I just want my game title to start near the middle of the screen, then after a short delay, move up a few blocks and stop near the top.

I know this should be simple to do, but lack of tutorials has forced me to once again have to ask a rookie question (I was trying to attach the text to an invisible block and have the block move, but somehow triggered another dreaded infinite logic loop in the process).

7 Likes

The x and y inputs on a label allow you to move them :upside_down_face:

3 Likes

Thanks! So I just have to connect those to timers and tell it when to move and when to stop, basically?

3 Likes

Pretty much. If you want to get fancy, use eases but that’s about it :upside_down_face:

3 Likes

Nice! I’ll play around with it and give you solution credit if I’m able to make it work right without any additional follow up questions. :+1:

3 Likes

Coolio, just glad to help :upside_down_face:

1 Like

Yikes… even just adding a -1 to the Y moves it instantly to the top of the screen, and it won’t let me input a lower (erm… technically higher) value between 0 and -1. I just want the text to slowly crawl up and then stop near the top.

1 Like

The label x and y inputs are the label’s x and y coordinates, so when you set y as -1, it goes to -1 y. Try creating an object and have it move, then just set the label’s coordinates to the object’s coordinates via globals or extractors (you have indie so I would suggest extractors) :upside_down_face:

1 Like

That makes sense. I haven’t used globals or extractors yet, but I need to learn eventually… (why not now, right?)

1 Like

Globals and extractors are very helpful tools so learning them sooner is better :upside_down_face:

1 Like

Absolutely. So in case I need help with those… should I keep this topic open, or make a separate topic for those?

Trying to follow forum etiquette here.

2 Likes

You can just use this topic, it is connected and less topics are better :upside_down_face:

1 Like

If you need any help with anything ping me here or on discord, I answer less on discord though.

1 Like

Currently I’m trying to figure out how to make extractors work…

I have a text label that is near the middle of the screen. After a 10 second delay, I want it to move slowly up towards the top of the screen, then stop.

1 Like

yeah, you’ll only want to use extractors to find an objects position in pixels, there are 32x32 pixels in one 1x1 grid in flowlab.

So extracting this x, and this y, then connecting it to the x and y of a label will make the text go to where ever the object is.

then all you have to do is move the object.

Here’s an example i made a few days ago:

2 Likes

I tried something similar, but I tried attaching the text to its own object to move with the object itself, and found myself in an infinite logic loop. :man_facepalming:

So… if I make a blank block and have it move up 3 blocks, and connect the extractor to the label, the label will move up when the block moves up, right?

1 Like

Extractors will extract the object’s current position, or another object’s current position. You would have to extract the blank block’s position and then set the label’s position using the extracted coordinates from the blank block :upside_down_face:

2 Likes

To do this, you could have the object with the label extract the blank block’s position (which is what I would recommend) or you could have the blank block extract it’s own coordinates, then use those to set globals and have the label block use those globals to set the label :upside_down_face:

3 Likes

Ok, I got it (I think). :smile:

2 Likes

Brilliant!!! That worked!

Thank you both @MelloJello and @00T_Free ! :+1: :+1: :+1:

Sorry I can only give one solution credit… :frowning_face:

2 Likes