Here I am again with a question that I can’t find the answer to. I have a game with a lobby with a functional voting system. You can vote for a map (a place), most votes win and everyone gets transported to that place. That all works perfectly.
For now I have one place (The Graveyard), a survival map, once you die (by zombies) you get transported back to the lobby. So far it works perfectly. So the round in the place ends either after a set countdown (6 minutes) or if everyone has died.
Now my question is, how do I let the lobby know that the round has ended in place ‘The Graveyard’. I’ve read about the MessageService, but that works Universe-wide, so if I would have a lot of players with multiple servers and hence multiple lobby’s and graveyards it would end each game everywhere, regardless of its state.
So to summarize, how do I tell the lobby that a round in another place else has ended? Maybe I think too difficult?
Hi, I think I have an idea but it might not work but we’ll see. So u could maybe add a folder in workspace and once a new round starts u just parent the players in the folder and when they die they get removed. Once everyone is dead/removed you could just stop the round by just detecting if the folder is empty. Another thing u can do is to add teams and when a certain team is empty you could just stop the round!
Hope this helps a bit!
Oh I think u misunderstood a bit. So he has a working round system that counts down from 6 minutes to 0 and a new round starts “When the timer runs out”. Now one of the maps include zombies that kill the players. So when all the players die the round is still gonna count down. what he is trying to achieve is to break the round/loop so that a new round can start.
Hope you understood now!
/Primal
If it’s in another game then please resort to using MessagingService as @bluebxrrybot said!
Otherwise if it’s in the same server create a Bool value in the workspace that will change its value based on if a round has ended or not.
I’m sorry if anything is unclear. Basically what I’m asking is how to communicate between Place B and my ‘home Place’ which in this case is my Lobby.
@laughmank was right, I’m simply trying to let my Lobby (which is also a place in my game) know that the round in some other place has ended (no matter for what reason it ended, because everyone died, or the round timer was up).
That is why I resorted to MessagingService, I know that can send a message ‘round over’ from Place B to A (and I mean literal places here). But that works Universe wide so if on server X in Place A the game would be over, and I use MessagingService to tell Place A that the round in Place B is over (so indeed the voting etc and a new round can start again) this would mean that I have multiple servers, EVERY place B would be told that the round was over, even if on other servers they are still playing.
I notice that I find it very hard to explain correctly. The Bool idea that @ViridianDevil suggested is a great idea but still I would need a way to KNOW that the round has ended in another Place.
Let me know if you guys need any more clarification and thank you for responding everyone!
Thank you for your time for clearing it up for the others! Yes the Boolean value idea is indeed a good idea, personally I haven’t used Boolean values for detecting players but it actually should work according to my calculations. Otherwise I think the folders with the player and teams should definitely work!
//Primal