Hello, Im trying to create a system where you can request other players to pair through proximity prompts. This type of system can bee seen in lots of co-op themed games such as Altitorture & many other two player obbies. The thing that im trying to do, is optimize my code and make it as easy as possible.
I’ve tried coding such system before, but it ended up being a total mess. I had like 10+ Remote Events going in and out for 1 system, which obviously isn’t the way. I need help with the algorithm and understanding better its realization.
There are factors which I want to take into consideration:
- Make sure the proximity prompt is placed in everyone, except on the client itself.
- Once triggered, the player whose proximity had been triggered, gets a GUI pop-up with 2 options: Accept, Decline.
If Accept is hit, they get paired up. Otherwise, they reject their request. - Once a player requests another player to pair up, the proximity prompt on both of them will get disabled for EVERYONE until the request has timed out or the requested player hits decline.
- A way to determine whether a player is paired up or not.
Its a bit of a complicated system to work with, so if anyone has some feedbacks or tips on how I can put it to realization, that would be highly appreciated! Anyway, thanks.