How to make a system that checks what team a player is on when they press a button?

I’m making a shop that you could visit during the match that would be used to help you and your team. So, basically, for one of the things you can buy, it teleports you inside the enemy base, and you can start attacking it. However, I realized you can’t just put a checker wired to a button, because it doesn’t check for the player’s team. I just realized that I can have a checker check for a property amount that is somehow linked to the player’s team, and then the checker would… well, I don’t really know how to explain it, but I know how to do it. So I’m going to test it, and if it works, I’ll delete this post so it doesn’t create clutter, and if it doesn’t, I’ll just reply that it didn’t work.

I just realized that I can have a checker check for a property amount that is somehow linked to the player’s team, and then the checker would… well, I don’t really know how to explain it, but I know how to do it. So I’m going to test it, and if it works, I’ll delete this post so it doesn’t create clutter, and if it doesn’t, I’ll just reply that it didn’t work.

Ok! Here to help if it doesn’t.

Do you mean you can ask @Here_to_help ?

No, I’m just here to help.
Also, @here_to_help doesn’t want their name to be used as words with an @

Oh, my bad

If it does work just mark your post as the solution.

I don’t think it’s gonna work :frowning:

Ok im no genius at code, but shouldn’t you use zones and checkers?

well, I’m checking for what team they are on when they press a button, so I don’t think a checker will work, unless I do something with properties.

You could set it at the beginning with a trigger and blocks, but that’s boring and can be made more efficient. So here it is:

Make a lifecycle that listens for game start. Make it broadcast on “Start Game Start”. Make 2 relays, one broadcasting to team 1, and one for team 2. Make the one for team 1 increase a counter with a default of 0. The counter should update the team property. Make the one for team 2 increase a different counter with a default of 1. It should also update the property.

IMPORTANT: Make sure all the property and counter scopes are for player.

2 Likes

@getrithekd’s writing his essay long response, that normally means it will work. Sorry that I was no help.

1 Like

your fine! at least you tried to help!

2 Likes

True, Its just that I don’t under stand blocks, its like giving a toddler a 800 page book and say summerize it in a essay. They don’t know what to do.

Wait, what about this:
image
image

2 Likes
That use blocks though... I'm kind of block-a-phobic now for all the unexpected reasons.

They’re too easy. They take up too much memory. They’re boring.

Could work, and seeing how I conveniently left out some important info that might mess with what @getrithekd said… it might work

You can change the channel names as you wish, or you could use wires.

Yes, if I had a normal-not-messed-up map that would work, but this is going to that minigame map that I’ve been working on, and, well, lifecycles have been useful, but for running things in the mini game, they haven’t helped me that much, unfortunately (If that makes sense at all)

Oh. Instead of a lifecycle, substitute in the channel that starts the minigame.

2 Likes