Me and @Coofin have been working on a multiplayer game for a little less than a week. But none of us have experience with multiplayer. We have a HP system that works in single player, but if another player gets damaged, the HP bar will be shown damaged to all players.
Can someone fix this?
This happens to me too. If I made a single player game and converted it to multiplayer, I can’t just turn the player object in a multiplayer object. That would make bars shared.
I haven’t found a fix to this but my guess is to make the bars SEPERATE from the player.
if you create an object variable insted of a global(if you did that) then any visual change will occur but only the player that did it should actually die. Let me know if it works
How do I do that though? That is kind of the issue.
You make UI and send messages and stuff.
But that would reply to all players wouldn’t it?
Maybe I do something with this?
Make it so the player objects have special numbers like 123213 or 56764335 and then they send the number to the they’re designated health bars filter and the health bar only gets one of the messages or you could make the players spawn the health bars and then you can make the message only get sent to the spawned objects.
I love working with multiplayer. Its a fun challenge. Do you have a screenshot of your code?
What code do you want?
Whatever your healthbar is in.
You need the player check object in your player. The player does not need to count the other player objects that are remote.
You could also make so that each player object spawns in their own health bar so the they could send the message to all spawned objects using the setting in messages and then it should work flawlessly.
Okay, I got that,
What do I do now?
What do I do?
I am unable to take a screenshot right now. You need to make it so that when the player is remote, it turns off the switch that has the collision attached to it.
I don’t exactly understand.
I am sorry for the inconvenience. I will be able to give you a screenshot this weekend.
Okay…