Bring to front “bug”

I feel like this has been reported before

Bring to front only increases the z index by 1 I think (did 1 “test”, confirmation would be nice) instead of setting z index to higher than all other z indexes

Is there a way to fix this? Or would it be smarter to remove bring to front altogether? I also presume that the same goes for send to back—it decreases z index by 1 but haven’t tested it

7 Likes

I thought it was a one time bring to front rather than setting a high Z index but I’m not fully sure.

New objects created still override Z index in general, and I think that is a bigger issue.

5 Likes

Possibly

I just had to use a couple bring to front blocks to get the object to actually be in the front so I figured it increased by 1

4 Likes

Huh, I’ve never noticed this

3 Likes

Doesn’t work that way for me

1 Like

Actually it just needs 2 bring to front blocks to actually bring it to front

1 Like

Is that why, when I use z index in a clone’s code, it messes up another object’s z pos, which has no connection to the clone whatsoever?

4 Likes

Bring to front kind of acts like a bring in front of all objects

You can easily avoid that by using set z index blocks

6 Likes

I tried using both bring to front and z index.
I’m using a bunch of when 7=7 bring to fronts and no z index now.

3 Likes

That’s what I do because I gave up on set z index.

3 Likes

Update 2:

Even though I use bring to front, the z index value of the object is 0 but it is in front—which is weird

4 Likes

Yeah.
When it was coming out, I thought z index was going to be as simple as x and y, but apparently not lol.

3 Likes

Me too. It’s not as simple.

3 Likes

It is though?

1 Like

So this hasn’t happened to you?
https://forum.gethopscotch.com/t/you-can-talk-about-your-hopscotch-coding-here-12-official/54666/6100?u=tankt2016

1 Like

Nope

1 Like

No, that’s likely you doing something wrong. What code are you using in the other object?

Yes that is very annoying.


It is, other than the fact it can’t be less than 1 and it has to be a whole number.

2 Likes

Sorry if I’m remembering incorrectly or somethings changed, or if I misunderstand you entirely, but from my knowledge being to front always only moved forward in front of one object at a time? Unless I’ve had a bug for 3 years and never known it. Actually I haven’t used bring to front for about a year so something could’ve changed

5 Likes

I don’t recall that happening for me, huh

4 Likes

Really? I’m sure I can find some old projects of mine with like ((repeat times 6) bring to front)

5 Likes