- Home /
Is there a way to move a button to a random location after a certain number of clicks?
I am making a clicker game, and I want to have the object to click move to a random location after a certain number of clicks. The purpose of this is to limit how effective auto clickers are, and to promote active play. I am fairly new to programming with little knowledge of advanced concepts.
Answer by finlay_morrison · Aug 27, 2017 at 03:10 PM
Im no pro so i cant give you perfect code but this is how i would do this :
have some sort of thing that every few clicks sets the transfrom.position of your button using random.range, eg transform.position = new vector3 (random.range(min, max), random.range(min, max), random.range(min, max))
where min is the lowest transform position and max is the highest, i hope this helps you
Your answer
Follow this Question
Related Questions
How do I create a Gmod item spawn menu in unity? 0 Answers
Controlling GUI with Xbox 360 Controller 1 Answer
Resolutions 1 Answer
Generating tooltips for multiple buttons. 1 Answer
Can't Get UI buttons to work. 0 Answers