I would like to make a shop where you can buy things but it bothers me that the player can't see how many thaler he's got.
Is there a way to script the amount of thaler the player has collected?
You could do a workaround which involves spotlights using shapes of numbers as gobos and have them controlled via script to display the amount of thalers on a sign at the shop.
Depending on how advanced your scripting knowledge is, this could be a bit hard to implement.
Then you're gonna have big problems. My only suggestion is either learn the basics of scripting in general before trying out the complex stuff like this, or look at Killings at Altstadt, as they did something simular there. Don't expect to understand too much while looking through it though.
You can easily script the amount they have by using global variables, but displaying it is another deal, as described above.
Every time you pick up the item, you'll run the AddGlobalVarInt("Thalers", 20); if you picked up for example 20 of them. You can then use GetGlobalVarInt("Thalers") when you buy something to check it the player has enough.
(02-16-2015, 04:41 PM)Mudbill Wrote: You can easily script the amount they have by using global variables, but displaying it is another deal, as described above.
Every time you pick up the item, you'll run the AddGlobalVarInt("Thalers", 20); if you picked up for example 20 of them. You can then use GetGlobalVarInt("Thalers") when you buy something to check it the player has enough.
Perhaps, only show how many you have, when you enter the shop.
You don't have to worry about showing it in every map. Just keep the script in the shop-map.
Using 10 different billboard, you'll be able to display what you need to display.
(1,2,3,4,5,6,7,8,9,0)
I actually kinda have a script for that. Let me see if I can rewrite it...
Oh, that seems like he made a lot of different items with numbers on them. And then checked every time he picked up more coins... A complicated way... But you can try that ^^