πŸ†Collectibles

a.k.a creating an Interaction with a Player Component

Just like entity components, we can add special components to players and the game as well. To track points a player can earn, we need to assign a Player Component. Head to Linking again, and you will see three new icons appear. These are components for Players, the Game overall, and the Environment.

Select the β€˜Player Components’ tab, press + to reveal more options on the right-hand side components menu, and select β€˜Score.’

Place any entity and add the β€˜Interact’ component to it. You can also change the text that appears when the player hovers over the item in-game, so for collectibles it’s best just to put β€˜Collect.’

Now create a link from the collectible; select β€˜Interacted’ and link to the players icon. Complete the link with β€˜Gain Score,’ filtering so only the player that interacted gets points.

Tip: By default, points go up by 100 whenever you collect something, so make sure your final score is large enough to accommodate this!

To finish it out, select β€˜Yes’ for β€˜Win by reaching.’ Now it’s a race to see who can collect the most first!

Last updated