Plz help. I spent so much time making the models for consumables for my game but now they are useless until I somehow know how to make them spawn randomly. their consume functions work tho. This is my game http://flowlab.io/game/view/1318925.
I did that
Do you have a spawner object to spawn the food?
Random for a random place on the X, and a random to pick a food.
Ok well turns out that it doesn’t work
Check out what it does in my game
http://flowlab.io/game/view/1318925 Its in the forest map. Also, pls don’t sue if ur computer melts
no one is going to sue you also it does not melt computers just adds a little lag
Ya see, the problem is that it always spawns in the same location. AND it always spawns somewhere where it isn’t its jurisdriction
Well there a few problems;
- The first random needs to be set in pixels, so between 15 and 946
- The timer is set to 1, so its possible to food to spawn on top of each other
- The range for food is Large
I would set the random with solution 1^, set the timer to 50 (5 seconds) and chance the food spawning from the second random form a 1 - 10. So every 5 seconds there is a 50% chance of food spawning.
You can change that, but I advise fixing the first random and not using 1/10 second timer (1).
Thx, the only problem was pixel thing. I thought it was blocks. I purposely set the timer to 1 because I wanted to make sure it works. Anyway, thanks for helping me last time and this time again.