D
D
dark_spectator2018-12-06 21:12:27
C++ / C#
dark_spectator, 2018-12-06 21:12:27

Implementation of tasks in a clicker?

Hello, how can I implement the execution and verification of tasks in the clicker?
Task types:
1) - Click nth number of times
2) - Earn nth amount of $
3) - Reach nth amount of $/s
4) - Reach nth amount of $/ click
I can't even imagine how it can be implemented. Tasks should be generated randomly, and the reward should depend on the player's balance and should not be identical.
Let's say a player opened a menu with a task for the first time, a task was generated for him, and it was saved. Let's say the balance = 0, the task is to click 1000 times, the reward is $5000, the second task should be generated randomly. and the number of clicks, $ / s, $ / click, it is desirable that it be round. For example reach 1000$/s
How can all this be realized?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Bogdan Nagorny, 2018-12-06
@dark_spectator

Hello, you can substitute the following algorithm:
1. The player receives a task (Collect one hundred cookies) and accepts it
2. we will have a variable in which will store the number of cookies received from a certain time
3. after receiving we reset the value of this variable
4. if the number of cookies in this variable is equal to 100 then the task is completed
this is as an example of course everything depends on the task

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question