Pseudo-Random Dueling System

HahaGetItPEE

New Member
Reaction score
0
Your typical hero wars map.
I've already got a working random player duel system, however some players tend to be randomed more than others, thus dueling more often. I would like to create a "Pseudo-Random" duel system, so when the duel system selects a random unit, players who have already dueled won't have a chance to be selected to duel again.

I would like to create a player group consisting of players who haven't dueled yet, so that all players will eventually get a chance, and when every player duels once, it resets the player group to consist of all players in the game.
when a player duels, the player is removed from the player group "HasntDueled"

So far i've got the player group, and every player in the game is in it. Removing players who duel is no problem, but i'm not sure how i can get the player group to recycle when there are no players left in it.
Help is very much appreciated.
 
If
number of players in hasntdueled = 0
then
pick every player
add picked player to hasntdueled
 
You need to to track back each player fight with another player.
If there maximum number of player is 12

Then you might need 12 x 12 = 144 combination
Which is create 12 boolean array variable with size 12 name hasFight1[12] until hasFight12[12]

hasFight1[12] refer to Player 1 has fight with whom
Eg:
If player 1 has fight with player 5
then hasFight1[5] = true

p/s:
You need to set by default hasFight1[1] = true, hasFight5[5] = true. Since this actually referring to the same player.

This is kinda complicated stuff since you need to write your own logic and algorithm actually.
 
I think the easiest solution is:

Condition: If HasntDueled is empty.
Actions: Pick (All Players) and do Multiple Actions:
- Add (Picked Player) to HasntDueled

The condition to check if a unit group is empty or not is under Boolean -> Unit Group - Unit Group is empty.
 
Hero1 already fight with Hero2 and
Hero3 already fight with Hero4.

Both Hero1,2,3 and 4 will be remove from group HasntDueled. Since they have duel.
But Hero1 and Hero4 actually didnt fight with each other yet

I think this is called sorting if we learn programming in c++
 
Asipo I don't think HAHA..... meant it to be that way.

What I think he meant was:
A random duel system where an even number of players pick heroes and square off against a random opponent. Each player fights one other counterpart per round.

So I don't think he needs every single combination of fight...
 
^^ that's correct, and you posted exactly what i wanted moridin.
i wanted to know a particular way of recognizing when the group was empty, and you gave me just that.

is there a way i can rep you or something?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top