PrettyPotatoo Posted January 7, 2018 Share Posted January 7, 2018 I was thinking about making a cool minigame. But i wanted players to teamup to do the minigame. But is there anyway to set that the minigame starts when 5 players has joined a lobby or something? Xeno and Alexoune001 2 Link to comment Share on other sites More sharing options...
1 Kibbelz Posted January 8, 2018 Share Posted January 8, 2018 Make an event you have to interact with, teleport the player into an enclosed room and increment a global value by 1. Once it reaches 5 the game starts. If you really want it sophisticated you can even decrement the global value if you put another event in the enclosed room allowing the player to leave and teleporting them out. Beefy Kasplant, Alexoune001, Xeno and 1 other 3 1 Link to comment Share on other sites More sharing options...
0 Khaikaa Posted January 8, 2018 Share Posted January 8, 2018 9 hours ago, Kibbelz said: Make an event you have to interact with, teleport the player into an enclosed room and increment a global value by 1. Once it reaches 5 the game starts. If you really want it sophisticated you can even decrement the global value if you put another event in the enclosed room allowing the player to leave and teleporting them out. I'm on the same situation. But how could we manage disconnections? I thought using a common event triggered when log in but don't know what to do when a player logs out during the minigame and logs in when the minigame has restarted, so it substracts 1 to the minigame's player variable when it's not supposed to substracting it. Is there any solution? Or just by coding? Link to comment Share on other sites More sharing options...
0 Kibbelz Posted January 8, 2018 Share Posted January 8, 2018 Unless there is a left game event trigger (I forget now) the only alternative solution is to simply check if each second if the player is there by running a map autorun event to check every x seconds. If this event counts 5 people (by running separate instances of the event) clearly someone has dc'd so you can check that way. Honestly with any kind of lobby system if someone dc's it always ruins the game, there is not really much of a way around it. Going to be honest if its just a casual chill little mini game I wouldn't even bother about it. Link to comment Share on other sites More sharing options...
0 Khaikaa Posted January 8, 2018 Share Posted January 8, 2018 48 minutes ago, Kibbelz said: Unless there is a left game event trigger (I forget now) the only alternative solution is to simply check if each second if the player is there by running a map autorun event to check every x seconds. If this event counts 5 people (by running separate instances of the event) clearly someone has dc'd so you can check that way. Honestly with any kind of lobby system if someone dc's it always ruins the game, there is not really much of a way around it. Going to be honest if its just a casual chill little mini game I wouldn't even bother about it. Ok ty, I'll try that what you say, at the momment everytime players dc I have to restart it manually (even made a command just for that purpose). Link to comment Share on other sites More sharing options...
Question
PrettyPotatoo
I was thinking about making a cool minigame. But i wanted players to teamup to do the minigame. But is there anyway to set that the minigame starts when 5 players has joined a lobby or something?
Link to comment
Share on other sites
4 answers to this question
Recommended Posts