Jump to content
  • 0

Minigame player requirments


PrettyPotatoo

Question

4 answers to this question

Recommended Posts

  • 1

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.

Link to comment
Share on other sites

  • 0
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

  • 0

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

  • 0
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

×
×
  • Create New...