Character Selection

I attempted to set up a way to select a character, once you click it a global value is updated to specific number, it’s on set not get or +, the character spawner however doesn’t get updated so it always spawns the first character, can someone help me fix this?

Oh my gosh, this is the game that I drew players for!
I think I see the problem:
The globals are set in an object that is only in the menu of the game. You need a controller, or any object that is both in the menu and the levels, which stores the global. Just use messages to send the value to one global behavior in an object that is placed in both the menu, and the gameplay levels. That should work. If it doesn’t, tell me and I’ll see what I can do.

It doesn’t matter that the object is only in the menu. Globals can be accessed by any object between any level, they’re a Global variable.
What I’m assuming is happening (I’m on mobile so I can’t check) is that you have some switches and have the Global go through that, but you’re struggling to turn a specific Switch on and others off.

What you should do is select the character in the Global (like I’m assuming you’re already doing), then use a Router for the selected character.

1 Like

I was already using a router, for some reason the global in the other level never updated/recieved the global value, not sure why, I’m going to test using messages, if that doesn’t work I’ll try more things

1 Like

could it be something with the spawn block as I know almost nothing about it?

I found the issue, there was no once leading into the global, I left the global there with no input

but seriously how does one use the spawn blocks?

You get the X and Y of the position where you want to spawn the object (1 grid block is equal to 32 pixels) and then you select what object to spawn

Thankyou, now that I know how the coords work I can actually use it better

1 Like