I am trying to create a fruit falling game. There was goinna be multiple fruit falling from the sky and into a basket to delete it. I copied this tutorial and did everything they did and I added “greater then 1 second” which was in the tutorial i did that but no apples came spawning. I then changed it to “less then 1 second” and multiple apples started spawing. so i was getting a variation of zero apples to 10000000 apples. How can i make it only one apple spawn out of the sky and how can i also spawn other fruits randomly. Can someone please help me and explain what I’ve done wrong and how I fix it?
Will only get actioned if the scene has just started, the timer (which doesn’t yet exist) is greater than 1 second and there are no apple objects in the scene. i.e., it won’t happen.
Instead, split that event into 2 separate events, both with the Start (or reset) the timer action. Have one event with just the beginning of scene condition, the second event with the other two conditions.
You need to have them next to each other, instead of the second one being a subevent. See how to 2nd event is indented? Make sure they are flat next to each other
Why are you picking a random apple and orange and chicken and banana and blueberry? Those conditions pick a random object that’s already in the scene. If there isn’t one of each of those objects, then the actions won’t be processed.
Are you trying to create a random fruit when the timer reaches 1 second? In that case, you need the apple object creation in the second event (or as a subevent off it) from this screen snip:
Ok so it ended up falling but how do i make it fall like multiple times but one fruit at a time?? You know what I mean
Also how do I stop my fruit from following me when it falls like I just want one fruit to fall from the sky at random and I want to add a bomb so if you catch it in the basket game over or you loose points
I have changed my game coding around and right now only one fruit falls which is chicken and I can’t colelct it with the basket because it follows me everywhere I go. I was wondering to make more fruit drop 1 at a time and how to stop the fruit from following me?
My first thought was to choose a random fruit from an array but then I thought “why not add a fruit just outside of view and then every x seconds add force to one of them.”