Finding the amount of an item for a triggering player (And other questions.)

shower brain figured out the problems i think

Issue 1: Counting snowballs: use an inventory item manager like getrithekd said. set it to track snowballs and update the property ‘snowballs’. make sure this property has a scope of player. step 2 of my guide has you make two triggers, and blocks in each. replace the long list of blocks in the first trigger with this:
image
where ‘Killer Snowballs’ is a text property with global scope.
replace the blocks in trigger 2 with this:
image
you probably won’t have to do step one of the guide.

Issue 2: make sure that you have the code above in two separate triggers, one wired from a ‘player knocks out’ lifecycle, and the other from a ‘player knocked out’ lifecycle. otherwise, they will both be the same, which would be awkward when it later says you killed yourself.

Issue 3: killstreaks are easy. have a counter and a linked property [named streak], both with player scope. wire a ‘player knocked out’ lifecycle to the counter so it resets the counter. wire a ‘player knocks out’ lifecycle to the counter so it increments it. now go back to trigger one, and make it like this:
image

bringing it all together: the original guide has 4 notifications due to map hazards and different messages for people on your team and not on your team. you probably only need one. because of this, you don’t need the relay or trigger wired from it in step 3. just wire one of the triggers from step 2 to the notification. create a block for wire pulse like this:


i don’t know if the randomized death messages are relevant, but you could just replace the original messages with stuff like ‘brr’ or ‘ouch’ or ‘that’s gotta hurt’. or you could just not have them.

if this isn’t coherent, tell me.

2 Likes

That looks like it would work, but why is there a line that reads, "Get Property: “Random Thought?”

that’s from the original, where ‘random thought’ comes from a randomizer. it stops the message from being the same every time.

i address that here:

Okay. :+1: (This text is irrelevant, the limit is annoying)

Just put random lowercase letter between < > (Without spaces) to bypass the word limit

Hello It still doesn’t work.

Here look at how I do it (Edit the wiki to see)
Extra:

Okay. Thanks, @Crimson_Knight (!)

1 Like

short message.

1 Like

I will see if that works later, I’m busy right now, so I need to wait around an hour.

The streak works, it’s that I need to display the player with the highest streak and their name.

Also,

Why is that a text property, it doesnt show up…

This is my setup:

This is what happens when I have 3 snowballs and the other player has 7:

ok sorry it should be a number property.

streak:
two properties: Top Name and Top player’s score
Top Name:


image
Top player’s score:

image

next, use the already existing streak property and wire it to a trigger. make this block in the trigger:

now, place an overlay.
block [on wire pulse]:


now wire the trigger to the overlay.
this will show the top player and their streak on an overlay. [probably.]

Streak works. (THANKS), but, the snowballs thing doesn’t, i’ll mark a solution when both problems are solved.

First, check all the blocks for correctness. Second, check that the snowballs are actually being put as a property and the value of that property by making a debug screen. I would put in all the snowball properties in that screen so you can see if they update correctly.

So there’s an option in the iim to edit a property. You should use that instead of blocks.

yes
i said that, but now the problem is somewhere in the middle

1 Like

It should all just be one property, and you use the get property as knocked out player and get property blocks.

i know how to do this, wait, i made it in my map. THe reason it doesn’t update is because it is in the same block code. Alright, here is the wirining. KO MANAGER ----> trigger
Trigger block code: Set DED player to triggering player name.

you need to seperate the winner and loser of a battle
you need a sperate trigger for the killing player and the ded player

that is why the original guide has two triggers
all of this is already included

oh, whoops sry