I am trying to end a game when someone runs out of an item

I am making a map and I want the game to end when either a item runs out or a specific team gets killed.

You can use an inventory item tracker and an “end game” prop. When the user has no items, the inventory tracker should end the game.

You should also read the docs, this seems like a very basic question:

(If I make any mistakes, feel free to correct me)

1 Like

The thing is, I looked through it and I need the game to end when a certain item runs out or when a specific team doesn’t have any players on it.

I also am a bit of a beginner at this and especially at the blocks part of it.

Here try this, its a guide on the basics of learning blocks.

1 Like

thank you some of this will be useful.

Your Welcome.

You could also use checkers.

Make sure to mark a solution!

Do you mean anyone runs out?

For that:

  1. Every time an action is run, check for all players (relay1 → checker) if the amount of item is greater than zero. If false, end the game. (Checker (check fails) → End Game).

For question #2, Every time the appleicable action is run, a relay for all of team two increment a counter, and then reset the counter with a trigger with a delay. Relay4 (Team 2) → Counter (Increment Counter) and (Relay4 (Team 2) → Trigger (Delay: 1 second) → Counter (Reset Counter). Link this counter to a property. Connect a checker to the relay, so when the action is run, with an even longer delay, check if the property is equal to zero. If true, end game. (Relay4 (Team 2) → Trigger (Delay: 2 seconds) → Checker (Property = 0) [If true] → End game).

2 Likes

You could use the property feature of the inventory item manager and make it check so if the property is 0 then end game.

That’s a lot of arrows. Might want to space it out.

Make sure to mark a solution !

1 Like

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.