Need some scripters help...
Posted: Mon Oct 23, 2017 9:39 pm
Ok so I attached everything you need to know inside the scene.
But here is a copy:
What I need is simple logic script
Just as clicking on buy/sell apple you choose your basket. When choosing, if you decide to take another one, the one that you have previously had will be returned (visually speaking) and gold for it will be returned. Also, I need that information of what basked I have would be saved into a variable such as a scene.my.basket = 1 for pink, 2 for orange, 3 brown and so on...
Example of works if you have 15 gold:
I press on the orange basket and I lose 8 gold. (Got 7 gold left)
If I would decide to get the brown one, I would get 8 (got 15 of gold) back from orange nad been taken away 6. (9 gold left)
You get the idea. I tried multiple scripts but they all are buggy, with bugs like - keep taking points for the same basket if pressed more then once.
basket value variable does not work
and so on. I know its easy bus as for a guy who does not program and knows only fundamentals of C++ and C# its quite hard haha. Thank you for reading this and putting some time. Thanks!
(And yes this will be featured in scene, that's why I'm asking for it)
If you don't mind, if you solve it just repost same scene or comment script in comments.
Thank You!
But here is a copy:
What I need is simple logic script
Just as clicking on buy/sell apple you choose your basket. When choosing, if you decide to take another one, the one that you have previously had will be returned (visually speaking) and gold for it will be returned. Also, I need that information of what basked I have would be saved into a variable such as a scene.my.basket = 1 for pink, 2 for orange, 3 brown and so on...
Example of works if you have 15 gold:
I press on the orange basket and I lose 8 gold. (Got 7 gold left)
If I would decide to get the brown one, I would get 8 (got 15 of gold) back from orange nad been taken away 6. (9 gold left)
You get the idea. I tried multiple scripts but they all are buggy, with bugs like - keep taking points for the same basket if pressed more then once.
basket value variable does not work
and so on. I know its easy bus as for a guy who does not program and knows only fundamentals of C++ and C# its quite hard haha. Thank you for reading this and putting some time. Thanks!
(And yes this will be featured in scene, that's why I'm asking for it)
If you don't mind, if you solve it just repost same scene or comment script in comments.
Thank You!