jeje52 wrote:Random values are different for every player, so you have to sync it so it's the same for everyone.
First, you need to pick a slot that will send the value to the other players. To make sure you don't get an empty slot, check if the player's hp is over 0. If the player isn't alive, pick another.
Then you randomize the value only for that slot. Again, to make sure the slot of the value isn't empty, check if the player's hp is over 0. If it's an empty slot, randomize again. Sync the value once you get a good one. After some time (1 second or so), everyone should have the same value.
Still, there may be issues if the selected player leaves before sending the value.
This is probably way too complicated to make just like that. An easier solution would be to use a simple single-use button that takes the initiator slot and uses that, but that's not really random. If you want real random value, I can make something for you to copy to your map.
daft punk 777 wrote:Here Is Map With Very Simple To Do Randomiser.
daft punk 777-easyrandomiser
daft punk 777 wrote:1 - its need to be one call randomizer, cause he wants to do infection with patient zero, it needs one call per round I think.
...
5 - really? I never checked this in MP, but I don't think what variable will be different for every player, only if one will join after randomizer was used... And If this really won't sync - just put another timer (or trigger exec) what disable other timers(triggers) after player selection. I think this will solve the problem, if it will be
wolf653 wrote:yes a copy and pasta would be preferred thank you
jeje52 wrote:wolf653 wrote:yes a copy and pasta would be preferred thank you
I made the not-so-simple player randomizer.
I tested it in multiplayer and it worked fine, though let me know if you face any problems with it.
Here's the link to the map page: https://www.plazmaburst2.com/?s=9&a=&m= ... &id=976997
I used a different method than I described previously. Three main differences are:
1. Player health isn't used to check if player is online. Instead, a more reliable method is used where every player sends a value using sync trigger actions. If the value is sent and then received by other players, the player is online.
2. Every player randomizes a player slot. The slot that has the most "votes" will be chosen. This way of doing it should make it more reliable, as failing to send one value doesn't topple the entire system. It also answers the question "who randomizes and sends the value" by avoiding the problem altogether.
3. It doesn't work in singleplayer. This probably won't bother you too much.
wolf653 wrote:so unfortunately issues with error 1010 occur with color pattern cmds and even moving decors to guns after the stuff was copy and pasted over the issue doesn't appear on custom guns that were added pre copy
Return to Bug Reporting Archive
Users browsing this forum: No registered users