Spawning an object inside an object, spawn ignores coordinates

I’m trying to spawn a button object (with its own label) inside a question field, but no matter what coordinates I put in, it stays at the top left of the field.

Have made sure the objects are not solid, and are on different levels. Not sure what to try next.

There is a bug with flowlab that makes the spawn block not spawn things at the desired location.
You might have to find another way to summon the object.

Ah damn that’s frustrating. Wonder if I could emit the buttons at 0 velocity :smiley:
Or attach them, if I can offset what is attached.

Looked for this in bug reports but couldn’t find it, guess I’ll move this there then

Uuuuuh, this “bug” is probably because you didn’t input the right numbers into the x and y inputs

1 Like

I’ve put various different numbers into the x and y inputs, but the button stays where it is–those numbers were some extreme ones I put in to test and see if it would budge, but no matter what I put there, it doesn’t move in any direction. Eg it’s getting 684 and 992 right now, but if I put 0 and 0 it stays in the same place.

Hope you’re right of course, would make things potentially easier :smiley:

1 Like

are you using floating point numbers?

oh, you’re not

The problem here is very simple: the Once that triggers the spawn is activating the Spawn input before the rest of the code even calculates the coordinates. You need to change the behavior order so that the Spawn input triggers after the coordinates are input.

3 Likes

Why do you have them spawn off-screen if they’re buttons? You could just have set coordinates for them to spawn if the camera won’t move.

image

Ok that’s weird–this is what it looks like when I press play:

I need to make this so it will work even if the camera does move, because this is intended as a dialogue box component that you could just add to whatever game you want.

Am trying this a different way now though, using the Attach behavior and Animations for text (Labels are too unreliable)

2 Likes

Labels are reliable, they just need to be used properly. Also, grazer should be coming out with a big label update this month.

2 Likes

Was a bit glib there–what I meant to say was since labels are intended for the GUI layer, it’s tricky to get them to stay in place in the game layer.

Any idea what Grazer is doing with the labels?

I’m not sure what’s being done to it, but I’d imagine it would be these things

  1. Size Input
  2. Color Input
  3. Font Input?
  4. Selection box for copies of the object to also create labels
  5. Rotation input?
1 Like