Talk:Score - Kill Count/@comment-66.87.104.239-20150604004435/@comment-24475768-20150604130133

You can use any number variable to do anything you want, the fact that you want this "current score" number variable to be your currency doesn't change anything.

To be able to open doors using money (or in this case, score), you have to create a door template and put logic cubes down to spawn doors, thanks to the line "WHEN [once] DO [create] [in-world picker -> door template]" in their brain. Then, in the brain of the door, you need a kode that detects your player, and ask him/her to pay to open. How do you check he/she can pay, and then change its money (score) count accordingly once he's validated? You have to look at the player's money (score) variable, using the [it] tile since you had detected him/her in a WHEN side earlier, and check that it is greater than your price to open the door. If it's the case, and the player validate his/her choice of unlocking the door, decrement his/her money variable by your price.

It's a bit harder to buy weapons, you have to set up a merchant brain. I won't explain that here, now that you know how to unlock doors with money, try figuring out the merchant brain for yourself. If you have troubles, you can look at the crossroads merchants' brains to see how they did it. There's also a video tutorial "Creating a Merchant Shop in Project Spark" on the Tutorial Videos page.