How to do stuff in multiplayer

How do I sync health for each individual player so everyone can see their health?
How would I make player objects sync? (they don’t stay in the same place on each screen)
How do I make sounds not shared?
How do I make a death screen that isn’t shared? (it has no multiplayer and it still shares)
Link: Flowlab Game Creator - Hangout

1 Like

I would also like to be able to make each player have a nametag but with current labels that’s impossible.

only people i know that understand flowlab multiplayer are @JR01 and @ManiacPumpkin, does anyone even know how to do any of these?

1 Like

If you run the health values through a Shared block they should sync, or better yet, through a Player Check–>Local–>Shared, that way the value only updates from the player object of the user who owns it.
Also, I’m not sure why you have rotation enabled on the player object but you probably want to turn that off…

1 Like

?
This is the second time someone has tagged in explains that I’m good or know multiplayer, lol. Although not entirely sure where you heard it from, but I’ve never used multiplayer in my life. I haven’t had indie long enough to ever find out.
I really wish I knew anything about it though.

1 Like

Hello,
The best option for multiplayer hitbars is to have each player attach a hitbar block that is not solid to themselves, then communicate with it via messages. Id you have any more multiplayer questions, J am here to help!

My health bar already does that. The best option in most games is a hitbar similar to that, or a health in the corner.

1 Like

How would I sync the player’s, though? They are never in the same position in each screen.

1 Like

this game is kind of a joke but the goal is create a game that you can play with other’s and have funny gameplay. hopefully it works and it will be a great pass-time.

they don’t, plus they glitch out and for some reason they attach on to the middle even though the sprite is obviously coded to attach on top (which is a flowlab bug)

also my death screen has no multiplayer but it shows up on both screens, and all the objects with no multiplayer make noise for both players somehow

About the Shared block, it can be buggy, but it really should work (you have to connect it for it to do anything? Maybe it was and it’s just not connected right now).
About the health bar, for some reason, attached objects in multiplayer behave differently. In a single player game, they will base their position on the middle of the entire space around the sprite. But in multiplayer, at least as far as I can tell, they base their position on the actual center of the object’s hitbox (i.e. it doesn’t matter how much empty space there is around it). So to fix your health bars, try filling in the whole sprite’s space with some color, and then just leave the animations as they are, that way it centers properly using the giant, filled-in, rectangular sprite, but looks normal with the animations.
I can’t really check the death screens or sounds; maybe someone else can try and tackle that.

This syncing is because the game doesn’t actually have a base host, instead each player runs the game individually with messages being sent back and forth purely for player blocks. This causes a lot of issues sucj as desyncing. Basically it’s impossible without help from @grazer. I attempted to do it on my scp game and got close but that’s it.

The issue with this logic is that the shared block starts up when the game starts, not when players join. So in order for this to work, you have to have the shared block not activate counters until all players are koined.

1 Like

From my experience, the Shared blocks do (or should) sync one time whenever a new user joins, or even whenever a user goes to a different tab and then clicks back to the game’s tab. But who knows; it would be nice to just get an explanation from grazer on how it should really work…

1 Like

I mainly just need to know how to make the death screen only appear for one person (the dead one) because currently since it renders health on each screen if one dies each game spawns it.

1 Like

I assumed the same but agter testing I can confirm it doesn’t work, at least as intended. Try making a shared block that has a chance of being destroyed and you’ll see what I mean.