I'm getting frustrated trying to figure out how to make my Minigame behave like Team Slayer. All I need is for Blue Team and Red Team scores to increment by one when they get a kill. Teams are enabled. Score Per Kill: 1 Score to Win: 100 In testing, only individual player scores go up. Blue and Red team scores stay at zero no matter how many kills either team gets. Note: I can't use regular Slayer for my game mode because I need to apply Player Trait Alpha and Player Trait Bravo for my Minigame to work properly. Huge thanks in advance for any help. This is the last piece that I need to sort out before my minigame is complete.
I also reached out to the creator of the Gun Game minigame, and he provided a solution in words for me. It will involve some of the same logic that his Gun Game scripts use. The meat of the complexity will involve 16 Timer Checks that track each player by assigning them a Label, and then using their assigned Number variables to manipulate Team Scores. He mentioned incrementing a separate variable that is used for setting the Team Score as well. I think that as long as I can diagram this logic before even touching Forge, it should be fairly easy to implement if I get it right on paper first haha
That is exactly what I was just going to suggest... this should work, and it may not be very complex afterall!
Did you get this working? I too am looking for a simple way to increment team score when players score kill points in a minigame mode. The Monitor's Bounty release notes specifically note this mode behaviour but say it is possible to script. But the Gun Game method with ball joints seems insanely complex for such a seeming simple mechanic.
i haven't dissected the gun game scripting, but it sounds like the challenge would be in assigning the labels to each player on each team. Then the rest is as simple as checking when their score has changed, and adding a integer to the variable assigned to the team's score each time that occurs. Or... Timer check and sum the scores of each player on a team every X sec. That may be tricky with the confines of the scripts though...
Thanks for responding. Assigning different labels to different players looks fiddly, but Gun Game has an approach with one brain per label and clever mods. It looks like the checking of player score changes is the hard part; you need a condition and actions that support using players as sources. "Number: Change" actions don't appear to support using the player as a source for global variable setting, except for terminal/switch interactions and boundary checks. So Gun Game uses an invisible boundary that follows the player around to grab that players score.
yeah, that is the tricky part, assigning labels and scores to players. I have the idea to have a contraption on a map that, when activated, will teleport a random enemy player to a designated "jail" of sorts, for a period of time, creating a "power play" type of scenario. I want to return to that idea at some point, but it may not be worth the effort.
So... Making a bit of progress here... I can get a boundary check to update a value (using a Number Change action) stored in a different script brain (one per player, using labels) to record the players' scores, and in turn use those to set the team score. Problem is, even if set to "continuous" and make it repeat, the boundary check only triggers the Number Change action on entry/exit. The only hack I've had success with is using another script to move the boundary up and down on a timer so it goes on and off the play area which makes it think the players have entered/exited, but it's a pain. Anyone got any better ideas? Anything that can repeatedly trigger an action with an "activator" source set to a player would do, I think.
isn't there a repeat param for the continuous function of the boundary check? I have this going in my Trek doors... based on a technique first mentioned by @Agent Zero85 EDIT: oh, and it may also come down to whether you allow the script to be interrupted, in this case, by itself. perhaps you could show us that script totally written out?
Yes, there is a Repeat option on the Boundary Check. But changing it appears to have no effect when the action is a Number Change. I will test the interruption suggestion tonight and provide the full script.
Just tried fiddling with the Interrupt setting. It defaults to On, but setting it to Off makes no difference. Simple test case: 1. Create an object with a visible boundary big enough to fit a player in. 2. Add a script to it as follows: When... Condition: Boundary: Check Check: Continuous Filter: Players Repeat: 0.00 (but try other values, it makes no difference) Do... Action 1: Score: Change Type: Team SCORERS: Mod 1: ACTIVATOR[add] Operation: Increment Source: Constant Value: 1 Randomize: Off Options: All "on" Then drop into player mode and walk inside the boundary. Your team score will increment once on entry and once on exit, but whatever the repeat is set to, it stays unchanged.
hmm... this is getting very convoluted, IMO. I have not tread on that territory before. However, I do have a working idea... Is there a way to force the score of Team X to be Y rather than simply incrementing it? If so... Why not just do this? Every x Sec determine score for each player add scores for all players on a team, setting a global variable to that new number force setting of team score to that new variable? it wouldn't be triggered by the event of a person scoring, but it would update within a short time interval to incorporate that person's score. crap, but then the thing that would break this is that a person leaving the game might cause the score to suddenly drop... hmm. If a player leaves and you keep the variable linked to their score "alive", and even better, if a new player can assume that label/variable combo, this might work.
Haha, yes. Convoluted is an understatement! "Every x Sec determine score for each player" is the first stupidly difficult challenge. The second is how to add them up accounting for JIP. I've proved (to myself at least) that continuous boundary checks are simply broken. Official maps like for Diminishing Kings don't use them, they use timers. But their scoring isn't based on player score so they don't have the same scoping problem I have. Good news, anyway... after a whole night of testing every action and condition available via timers, I have a working solution for triggering a script that can get the player score thay doesnt use boundary checks. It requires a unique label for each player and uses Number Change in the timer script to trigger a label-specific Number Check. It works because although the "activator" source is not available in the timer, it is available in the 2nd script via "extras" so the 2nd scriot can grab the player score. On the team scoring side, you've spotted the same issue as me. I had resigned myself to using a sum of all the current players, so if you leave the score drops. But I think I have figured an approach that "locks in" the score when you die. But I need to test it. Too tired to explain further right now. When I've polished the method a bit more I'll post a detailed explanation and eventually an example map/prefab.
Update: I have a working solution! It's insane, and uses 32 brains, but it works. It relies on every player getting a unique label, using a variation on the Gun Game scripts, which accounts for the first 16 brains. The second set use a timer and player scoped variables to trigger score updates. The two sets of brains could be combined, but I kept them separate for clarity. It's very hard to test, but I tried it with 10 people this weekend and it kept the team score accurately as far as I could see. However, I have one further idea to explore in the interests of simplification before I share.