Please read before linking a guide
I know there are other help topics on this but they don’t get an answer that works with what I want
I want it to be so that when you knock someone out all there bananas go directly into your inventory plus another one that I will just use a knockout manager for this is the most important part
I also would like if when a player gets knocked out either all their items go into the player who knocked them out’s inventory or drop on the ground (preferred) I know this may not be possible
Also I imagine that maybe properties can be used to keep track of what the player has and when they are knocked out they can be used but I’m not sure how that could work
I do not need a way to remove the items from the inventory as there is a setting for that
I can explain a way to track a “banana score” as a number on each player’s screen individually, but having actual bananas being removed and added is a pain in the back, and highly memory-consuming.
Like @Slim said, you could use properties to count the number of bananas. Then, use the ko manager to knock a player out. When this happens, get the property and use and item (de)granter to give you the number they had and them to lose the amount they had.
Here is the problem with using item granters- you cannot set a custom amount with a property, so you have to individually place item granters with -1, -2, -3, and so on. The current block code/way item granters are structured makes things difficult.
@Skizzle I was going to post this, but oh well. If you want me to finish it, then edit your post and ping me.
It’s really quite simple.
Create a new property called bananaScore. This will be player scoped, and will be a individual score for each player. This is a number property, and default is 0.
Create a new property called knockedScore. This will track the person being knocked out score. This is also a number property, global scoped, and default is 0.
Lifecycle Path #1
Place a lifecycle down. It should listen for Player Knocks Out. [1] When event occurs, place a wire that goes to a wire repeater. The wire repeater should delay the signal by 0.1 seconds.
Place a trigger down and wire the wire repeater to the trigger. (duh)
The trigger should have the following block code, explained here → [2]
Lifecycle Path #2
I just do.
It will run when a player knocks out another player. Be careful because there is another setting very similar to this!↩︎
The knockedOut variable makes the next line easier to read. The second line adds the two scores together. Both the enemies score, and your score. ↩︎