Forum Discussion

creepnpeep's avatar
creepnpeep
Seasoned Ace
3 years ago
Solved

New block needed in rules editor

We need a new block to be added to the rules editor to allow the game to determine a “win” based on player numbers in a team.

Currently, the game will only calculate a win based on score.

We need a block that enables the game to determine a “win” if a team no longer has any players in it (i.e if all players in a team have been killed then that team loses).

  • Shark2782's avatar
    Shark2782
    3 years ago

    @creepnpeep

    Create Rule: Ongoing/Global
    If(Equals) (CountOf)(FilteredArray(GetPlayers)AND(GetPlayerState) (CurrentArrayElement) (Is Alive) AND(GeatTeamId(CurrentArrayElement)(GeatTeamId( 1 )( 0 )
    Then EndGame(GeatTeamId2)

    Else if (Equals) (CountOf)(FilteredArray(GetPlayers)AND(GetPlayerState) (CurrentArrayElement) (IsAlive) AND(GeatTeamId(CurrentArrayElement)(GeatTeamId( 2 )( 0 )
    Then endgame(GeatTeamId)( 1 )

7 Replies

  • creepnpeep's avatar
    creepnpeep
    Seasoned Ace
    3 years ago
    @Shark2782 Hi mate,
    Appreciate the response and images.
    I will look closer at this today.
    But a quick question:
    Does your logic string mean that killed players can’t deploy?
    I want killed players to switch to the other team so they can keep playing and don’t have to wait on the sidelines for everyone else in the game to die.

    I’ll run your logic later and see how it plays.

    Thanks mate
  • Shark2782's avatar
    Shark2782
    3 years ago
    ok, then instead of the block to cancel the deployment use the one to change team.
    the block is "SET TEAM ID"
  • creepnpeep's avatar
    creepnpeep
    Seasoned Ace
    3 years ago
    @Shark2782 Hey bud,

    Yes, I had a fiddle around with it and think I have it working 👍🏼
    Really appreciate your help with that puzzle bud 👍🏼👍🏼
  • creepnpeep's avatar
    creepnpeep
    Seasoned Ace
    3 years ago
    @Shark2782 Hi mate,
    Are you able to help out with this abit more.
    I’ve got the game logic sorted.
    But the only thing I still can’t get right, is having the game declare a winner once one of the teams no longer have any players in it.

    Can you provide any further help with this?
    I think I’ve got everything else sorted.
    Team switching works etc.
    I just can’t get the game to declare a winning team! Really frustrating.
  • Shark2782's avatar
    Shark2782
    3 years ago

    @creepnpeep

    Create Rule: Ongoing/Global
    If(Equals) (CountOf)(FilteredArray(GetPlayers)AND(GetPlayerState) (CurrentArrayElement) (Is Alive) AND(GeatTeamId(CurrentArrayElement)(GeatTeamId( 1 )( 0 )
    Then EndGame(GeatTeamId2)

    Else if (Equals) (CountOf)(FilteredArray(GetPlayers)AND(GetPlayerState) (CurrentArrayElement) (IsAlive) AND(GeatTeamId(CurrentArrayElement)(GeatTeamId( 2 )( 0 )
    Then endgame(GeatTeamId)( 1 )

  • creepnpeep's avatar
    creepnpeep
    Seasoned Ace
    3 years ago
    @Shark2782 Hi mate,
    Really appreciate the time to respond to me.
    I will take another look at the logic I currently have running.
    If your last post mimics what you posted up previously, I did have that running but the game wasn’t ending when a team had no players left - it had me stumped and was so frustrating.

    I will take another look at your logic and try and get it working.

    I will report back.

    Thanks again

About Battlefield 2042 General Discussion

Discuss the latest news and game information around Battlefield 2042 in the community forums.16,120 PostsLatest Activity: 19 hours ago