How do you make the game a race and you have to be the first to reach the end to win?
Player Enters Zone > Grant Item
Player Enters Zone > End Game
Note: Go to the map settings and set the leaderboard score to specific item and set it to the one you put in the item granter
There is another way with zones, counters and properties but they cost more memory
These guides/posts might help:
Do you know the way with zones, counters, and properties? Is it in 1 of the guides/posts?
Sorry what is the question exactly please
How do you make a racing game, especially the finishing line, and if you’re the first to reach the end you win, but the game only ends when everyone reaches the end?
You could connect the zones on the end to counters with different targets to fulfill different player numbers.
Player Enters Zone > Increment Counter
Lastly, connect the counters to an end game device.
Target Value Reached > End Game
Maybe make it so when the first player enters the zone it sends a notification that says which player reached the end first and then wire that zone to a wire repeater and the wire repeater to the zone deactivating it. Then make another zone that increaments a counter and the counter’s target is the amount of players and when the target value is reached end the game with an end game device. Like what @Haiasi said
Continuing on from this, you can connect the counter to an item granter and the higher the rank, the more of an item is given.
Make sure the score settings in the leaderboard is “Specific Item.”
I forgot to add, place another counter with a target of 1 (not the same as the post above) and a scope of player.
Player Enters Zone > Increment Counter
Target Value Reached > Deactivate Zone
Also, Make sure ALL of your counters, not just the one that deactivates the zone is on player scope.
This makes sure players can’t go in it back and forth to cheese the game and bug it.
For the notification have it like this in its block code
Blockquote
Title: “First!”
Content: Create text with: Triggering player’s name
: “Reached the end”
It’s actually more like this:
(Also, I’d suggest using
for your blockcode, edit the wiki to view the hidden text)
Send Notification
Title: “Triggering Player’s Name”
Content: Has reached the end!
How did you make the text red? Just wondering
At the beginning of the game, make a relay broadcast on “set players left”. Make a trigger go off on “set players left”. Code:
set property: "num players left"
Value: get property "num players left" + 1
Num players left is a global scoped number property. (You could also do a workaround of the block code with a counter.)
Then, when someone finishes the race, a wire pulse goes through a trigger, into an item granter. The item granter gives them one of the items used for in the leaderboard. The trigger also deactivates itself when the wire goes through it. Make another trigger go off when someone finishes the race. In the trigger’s blocks, it does this:
Set property: "Players finished race"
Value: Get property "Players finished race" + 1
If: Get property "Players finished race" = "Get property num players left"
Then:
Broadcast on "End game"
Then, in an end game device, make it go off on “End game”. Players finished race is a global scoped number property.
This should work. If it doesn’t, I can help you even more.
The way I did it in GK8 was to set up a player counter (You can look it up! It’s really easy!) then placing a zone and a counter linked to a property. When zone entered → increment counter. Wire a trigger with a delay to the zone, and when activated, have it run block code where it compares this property to the player counter property. If they are equal, end game.
This guide may help, too.
Do you need anything else?
This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.