Randomly generating objects
-
- Prole
- Posts: 4
- Joined: Sun Dec 20, 2020 4:28 pm
Randomly generating objects
Hi everyone, I have a little problem. When creating a game, he draws 2 barrels which are to move towards the protagonist over time. However, I would like the barrels to generate randomly with a minimal distance between themselves. The problem is that I can't reference the x variable that is being updated. is it possible to somehow funk draw put a delay function to which I will give the time with which the barrels will be drawn?
Re: Randomly generating objects
That was a bit difficult to understand. What is the problem? Do you have trouble with spawning at a minimum distance between barrels? Do you have trouble with delaying the spawn? With both? What does "the x variable that is being updated" mean? What does "funk draw put a delay function" mean?
Re: Randomly generating objects
If you can share your code, or a similar piece of code, that will also help us to help you.
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
Re: Randomly generating objects
Looks related to their thread about making a flappybird clone game, in here:
https://love2d.org/forums/viewtopic.php?t=90016
https://love2d.org/forums/viewtopic.php?t=90016
Re: Randomly generating objects
Oh, I had the same problem
Who is online
Users browsing this forum: Bing [Bot] and 7 guests