Variables/Triggering Player Difficulties [RESOLVED]

Here is the code you showed me earlier, for one of the buttons.

I’m sorry I’m slow on the uptake, I just like to understand how things work. Two of the components in the code are triggering players team number, and the other is triggering player’s score.

In my game the score is not based on the item being stolen, so the score seems obsolete with that in mind. And the team number also seems like it could screw up the code. Wouldn’t that mean that team 18 will always end up stealing more than team 3 because the value of their team number is larger?

No, because this example was coded wrong. Get score of team should be directly connected to triggering players team number, and THAT should be added to amount of bait.
Screenshot 2023-06-26 10.03.58 AM
Screenshot 2023-06-26 10.04.03 AM
(That is just overlap from my scrren not being big enough for one screenshot)

1 Like

@Zypheir, can you tell why this block setup doesn’t work?
image
The first block of code that runs.
image
The second block of code that runs.


The whole build.

1 Like

What is the triggering player’s score? Is it counted in bluefish, knockouts, etc.

1 Like

The amount of fish they have, which is set to 5 for testing purposes.

1 Like

Yo, since you had made a request of not giving up on your maps, and nobody made it - i made it for you, and everyone else. E

1 Like

Has AUO been considered in this? Because what if it clears the number, then stores a value of 0?

1 Like

I added the inventory item manger after everything else.

1 Like

mysz

13h

No, variables are only for one block. Properties are for every block. What you can do is set a variable to a property, make it act as a property, and set the property equal to a variable.

@mysz I think I did what you said here in the picture below. I used the inventory manager blocks. To me this seems like circular logic where no real values are being exchanged. Look at the Team 3 code in particular. They are both trying to derive value from each other, when neither has any value.

image

That’s why it would be nice if I could reuse variable from other devices.

Okay, so this is what I derived…

The bottom button is the one that gives you the blue fish to test, nothing important there.
The middle one is used to store the bluefish, this is the code

The top one is used to subtract the fish from the bank and give them to you,


Seems to work for me, the storedfish property is global, the amount of fish is player dependent, not sure if this is what you were looking for though. Tell me if this is what you were looking for!

2 Likes

*me pressing the heart button and not understanding any of the block code : P *

2 Likes

I’m testing this out now. I probably didn’t do everything in the correct order, and I know because of AUO that the order is important.

What is the purpose of the text?

What doesn’t work about it? I’m guessing (as WhoAmI did) that it could have something to do with the player’s score, because everything else seems fine - if the player’s score keeps track of all the fish that the player has ever gotten, then the amount stored in the property could be increased far more than it should be. There could also be problems with the scale of the property’s change being something other than global, but I’m assuming you already checked that… I can try and make a system like this to test it, but there are probably going to be some limitations that I can’t find a way around.

3 Likes

I started the game with 5 blue fish. Score= 5. Then I pressed the bottom button, losing all my fish and setting my score to 0. Then I click the top button. Nothing.

1 Like

Yeah, I just tested it out with 4 players and could not get it to function like I wanted it to.

@Zypheir
Just for clarity sake, in my game you purchase blue fish that you then trade in to get GimFish. The leaderboard and game score is predicated on who has the most Gimfish.

I don’t want people to be able to steal GimFish because that would be too OP.

I want people (up to 20) to be able to steal BlueFish.

I have no coding background at all. My only experience with all of this comes from the release of Gimkit Creative a month ago, but logically to me I need properties that keeps track of how many total bluefish each person has.

Then players can go into a different player’s home, click a button/trigger and steal the amount of BlueFish that player has.

I feel like I have more success with using properties when I attach them to counters.

@mysz, do you think that we could use an altered version of your interest guide to steal stuff and provide an incentive to get it stolen?

1 Like

Here is a (very) simple way of allowing players to reference and change the amount of fish stored:

The block used in the first button (for storing the player’s fish):
image

The block used in the second button (for stealing all fish currently stored):
image

The main problem with a system like this is that anyone is able to steal fish at any time, regardless of what team they’re on or what team they want to steal fish from - there are only two properties used for all teams, so the fish storage shown here is universally shared between all teams. You can use more specifically named properties (team1_storedfish, for example) to make storage systems for each team, but in order to restrict storing/stealing privileges (like only allowing team 1 to store fish at their storage button) you’ll want to use wire repeaters as well. Hope this helps :]

5 Likes

He doesn’t post often, but when he does…

3 Likes

It would be more complex, but you might want to try to use the interest guide to press a button to take away fish from someone else, and then store it in a property. You can retrieve the stored fish in your place, but other people can take the stored fish from you. That’s a thought

2 Likes

btw i haven’t really been following this topic so i don’t know if that would even work

2 Likes