So i have this issue: I have an object that when clicked gives the player random points (1-5) and at the same time i want the score to pop up next to the object and only show the current score (the one that the object gives when clicked) and when the object resets i want the score that pops up next to it to show just the current score and not the overall score… Lets take coockie clicker for example but when you click lets say 30 times the coockie is deleted and a new one appears - i want to make just the pop up score that the new coockie gives to show up (as a pop up)… Any ideas?
Hi, after reading your post a few times, I still don’t fully understand what exactly your problem is. If you want to show your random click value next to the object and the total score of the click values you just need two variables (e.g click_score and total_score) and display them with two text objects.
Here is an example that tweens the value above the object when clicked (so the text field needs the tween behavior) and it also shows the total score of all the click-values in another text object.
I want the pop up score (next to the object) to only show the points accumulated from clicking the object and at the same time that score to be added to the overall score and when the object is deleted and a new one is created the pop up score again to show just the score accumulated from that object… For example - you click a coockie 10 times and each click gives you “randominrange” points than the coockie is deleted anda new one appears - the points the new one gives you only show next to the coockie but the points accumulated from both coockies are added to the main score… And when a coockie is dleted the pop up score should only show the score you get from each coockie… Like you have a coockie and it gives you 10 points, you delete the coockie, new one appears and the pop up should not show 10+the points the new coockie gives, like when the coockie is deleted the value of the pop up socre is reset to 0 but he points before the reset are accumulated in the main score…
In this example all clicker objects are in one group “clicker”. There is a scene variable ‘score’ that gives the random value. This value is than added to an object variable ‘add_click_score’ of clicker and displayed over each object of the group. Since this is an object variable it is different for every object, depending on the accumulated click-scores.
There is another variable total_score that adds all the values from the object variables.