Im making my first game and need a bit of help

i would like to make a coin a heart and a spike fall from the top of the screen so people have to colect and avoid if anyone could help that would be lovely

First, what makes things fall?

Gravity.

Second, it’s very hard for people to help you if you don’t post a link (To your game).

Third, Welcome to the Community! It’s great that you are already making games!

okay so to awnser your first thing its gravity and here is the game

Good. That’s one solution to make things fall. The other, which works no matter if the object is solid or not, Velocity. I see you are already using this. You said you also wanted a coin to fall?

Also, here’s a tip, don’t use more than one object for more than one thing. In this case, you only need one coin object.

yes ive done a bit of it but dont fully understand it lol

Ok, so velocity gives an object a consistent speed as long as there is a constant input. What will allow the coin object to be affected by velocity?

the gravity of said object?

Yes and no. In this case, you need the original coin object to be movable. (It’s in physics).

Also, instead of wasting an object for the ground of the boss level, just use this bundle.

{"data":{"behavior":{"v":"2","nodes":[{"inputCount":0,"outputCount":0,"name":"Animation","behaviorType":"logic.NodeGroup","x":-450,"y":64,"group":"","id":"15cfa869ba5cb044","isMenuItem":false},{"inputCount":0,"outputCount":1,"name":"Always","behaviorType":"logic.triggers.Always","x":-450,"y":64,"group":"15cfa869ba5cb044","id":"15ceea510449a24e"},{"inputCount":2,"outputCount":2,"name":"LoadLevel","behaviorType":"logic.gameflow.NextLevel","x":-270,"y":56,"group":"15cfa869ba5cb044","id":"15cef3d941a1fb46","levelId":0},{"gateVal":3,"mode":"equal to","inputCount":2,"outputCount":2,"name":"Filter","behaviorType":"logic.logic.Filter2","x":-90,"y":48,"group":"15cfa869ba5cb044","id":"15cf17435bd9d148"},{"inputCount":3,"outputCount":3,"name":"Animation","behaviorType":"logic.properties.Animation","x":90,"y":32,"group":"15cfa869ba5cb044","id":"15cf879a83d25240","animationName":"Boss Block","loop":true,"priority":0}],"links":[{"input_id":"15cef3d941a1fb46i1","output_id":"15ceea510449a24eo0"},{"input_id":"15cf17435bd9d148i1","output_id":"15cef3d941a1fb46o1"},{"input_id":"15cf879a83d25240i0","output_id":"15cf17435bd9d148o0"}]}}}

Try to understand the code. The object is always checking if the level is level 3, if it is, it triggers a looping animation (Just make the animation one frame, which is the boss ground block.)

Do you want the coins, hearts, and spikes to be consistently falling, or only once?

Do you want the objects to spawn randomly, or in a constant pattern?

1 Like

i would i like for the coins spikes and hearts to consistently fall and random please

Ok, first, import the bundle into your game. (The one for the animation).

To make the objects fall consistently, you need a spawner. Here, I’ll draw a spawner real quick.


Here, make it something like this, so you know what it is.

Now for the code. If you want it to spawn randomly, you need a randomizer. I’ll just make the bundle.
@nhgcr_for_the_3rd_time , I’m having some trouble, lol. It’s MUCH harder than I thought. Here’s my code, it’s a start, I think, but I just found that I made a few mistakes. Do you know how to do it?


You might have to take it from here nhgcr, if you’re still there.

1 Like

im still here this is a great help thank you so much

Not yet it isn’t. This might not even work.

{"data":{"behavior":{"v":"2","nodes":[{"delay":20,"count":0,"version":2,"inputCount":3,"outputCount":1,"name":"Timer","behaviorType":"logic.triggers.Timer","x":-360,"y":-144,"group":"","id":"15dcd64cee032d4d"},{"inputCount":3,"outputCount":1,"name":"Random","behaviorType":"logic.logic.Random","x":-90,"y":-136,"group":"","id":"15dd2ed3aef9c245","min":1,"max":3},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":90,"y":-128,"group":"","id":"15dde952304d7c4e","startVal":0,"roundMode":1},{"inputCount":3,"outputCount":1,"name":"Random","behaviorType":"logic.logic.Random","x":-90,"y":-256,"group":"","id":"15e013423702694d","min":1,"max":3},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":90,"y":-328,"group":"","id":"15e013424b85b945","startVal":0,"tag":"","roundMode":1},{"inputCount":3,"outputCount":1,"name":"Random","behaviorType":"logic.logic.Random","x":-90,"y":-8,"group":"","id":"15e01691c4541041","min":1,"max":3},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":90,"y":184,"group":"","id":"15e016917dd36e45","startVal":0,"roundMode":1},{"gateVal":1,"mode":"equal to","inputCount":2,"outputCount":2,"name":"Filter","behaviorType":"logic.logic.Filter2","x":270,"y":-488,"group":"","id":"15e2c6b470b73b40"},{"gateVal":2,"mode":"equal to","inputCount":2,"outputCount":2,"name":"Filter","behaviorType":"logic.logic.Filter2","x":270,"y":-392,"group":"","id":"15e2c789e0936545"},{"gateVal":3,"mode":"equal to","inputCount":2,"outputCount":2,"name":"Filter","behaviorType":"logic.logic.Filter2","x":270,"y":-288,"group":"","id":"15e2c8aad3fb9944"},{"gateVal":1,"mode":"equal to","inputCount":2,"outputCount":2,"name":"Filter","behaviorType":"logic.logic.Filter2","x":270,"y":-192,"group":"","id":"15e3459b9369f641"},{"gateVal":2,"mode":"equal to","inputCount":2,"outputCount":2,"name":"Filter","behaviorType":"logic.logic.Filter2","x":270,"y":-96,"group":"","id":"15e3459bd74a1f41"},{"gateVal":3,"mode":"equal to","inputCount":2,"outputCount":2,"name":"Filter","behaviorType":"logic.logic.Filter2","x":270,"y":8,"group":"","id":"15e3459b0fd27448"},{"gateVal":1,"mode":"equal to","inputCount":2,"outputCount":2,"name":"Filter","behaviorType":"logic.logic.Filter2","x":270,"y":104,"group":"","id":"15e377726a566d4d"},{"gateVal":2,"mode":"equal to","inputCount":2,"outputCount":2,"name":"Filter","behaviorType":"logic.logic.Filter2","x":270,"y":200,"group":"","id":"15e377729799af49"},{"gateVal":3,"mode":"equal to","inputCount":2,"outputCount":2,"name":"Filter","behaviorType":"logic.logic.Filter2","x":270,"y":296,"group":"","id":"15e37772c4bc7349"},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":540,"y":-336,"group":"","id":"15e975e2c4519e45","startVal":0,"tag":"","roundMode":1},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":540,"y":32,"group":"","id":"15e9768b4d67eb49","startVal":0,"roundMode":1},{"inputCount":3,"outputCount":1,"name":"Number","behaviorType":"logic.logic.Value","x":540,"y":-152,"group":"","id":"15e9773a4c4e4e44","startVal":0,"roundMode":1},{"inputCount":3,"outputCount":1,"name":"Spawn","behaviorType":"logic.components.Spawn2","x":810,"y":16,"group":"","id":"15eb39d39a11ef4e","entityClassId":17556653,"spawnX":384,"spawnY":-16},{"inputCount":3,"outputCount":1,"name":"Spawn","behaviorType":"logic.components.Spawn2","x":810,"y":-328,"group":"","id":"15eb39d3f5bca244","entityClassId":17551834,"spawnX":256,"spawnY":-16},{"inputCount":3,"outputCount":1,"name":"Spawn","behaviorType":"logic.components.Spawn2","x":810,"y":-152,"group":"","id":"15eb39d37c5c354a","entityClassId":17556599,"spawnX":320,"spawnY":-16}],"links":[{"input_id":"15e013424b85b945i1","output_id":"15dcd64cee032d4do0"},{"input_id":"15e013423702694di0","output_id":"15dcd64cee032d4do0"},{"input_id":"15dd2ed3aef9c245i0","output_id":"15dcd64cee032d4do0"},{"input_id":"15dde952304d7c4ei1","output_id":"15dcd64cee032d4do0"},{"input_id":"15e01691c4541041i0","output_id":"15dcd64cee032d4do0"},{"input_id":"15e016917dd36e45i1","output_id":"15dcd64cee032d4do0"},{"input_id":"15dd2ed3aef9c245i0","output_id":"15dcd64cee032d4do0"},{"input_id":"15dde952304d7c4ei0","output_id":"15dd2ed3aef9c245o0"},{"input_id":"15dde952304d7c4ei0","output_id":"15dd2ed3aef9c245o0"},{"input_id":"15dde952304d7c4ei1","output_id":"15dcd64cee032d4do0"},{"input_id":"15e3459b9369f641i1","output_id":"15dde952304d7c4eo0"},{"input_id":"15e3459bd74a1f41i1","output_id":"15dde952304d7c4eo0"},{"input_id":"15e3459b0fd27448i1","output_id":"15dde952304d7c4eo0"},{"input_id":"15e013423702694di0","output_id":"15dcd64cee032d4do0"},{"input_id":"15e013424b85b945i0","output_id":"15e013423702694do0"},{"input_id":"15e013424b85b945i0","output_id":"15e013423702694do0"},{"input_id":"15e013424b85b945i1","output_id":"15dcd64cee032d4do0"},{"input_id":"15e2c6b470b73b40i1","output_id":"15e013424b85b945o0"},{"input_id":"15e2c789e0936545i1","output_id":"15e013424b85b945o0"},{"input_id":"15e2c8aad3fb9944i1","output_id":"15e013424b85b945o0"},{"input_id":"15e01691c4541041i0","output_id":"15dcd64cee032d4do0"},{"input_id":"15e016917dd36e45i0","output_id":"15e01691c4541041o0"},{"input_id":"15e016917dd36e45i0","output_id":"15e01691c4541041o0"},{"input_id":"15e016917dd36e45i1","output_id":"15dcd64cee032d4do0"},{"input_id":"15e377726a566d4di1","output_id":"15e016917dd36e45o0"},{"input_id":"15e377729799af49i1","output_id":"15e016917dd36e45o0"},{"input_id":"15e37772c4bc7349i1","output_id":"15e016917dd36e45o0"},{"input_id":"15e2c6b470b73b40i1","output_id":"15e013424b85b945o0"},{"input_id":"15e2c789e0936545i1","output_id":"15e013424b85b945o0"},{"input_id":"15e2c8aad3fb9944i1","output_id":"15e013424b85b945o0"},{"input_id":"15e3459b9369f641i1","output_id":"15dde952304d7c4eo0"},{"input_id":"15e3459bd74a1f41i1","output_id":"15dde952304d7c4eo0"},{"input_id":"15e3459b0fd27448i1","output_id":"15dde952304d7c4eo0"},{"input_id":"15e377726a566d4di1","output_id":"15e016917dd36e45o0"},{"input_id":"15e377729799af49i1","output_id":"15e016917dd36e45o0"},{"input_id":"15e37772c4bc7349i1","output_id":"15e016917dd36e45o0"}]}}}

Here’s the code, if you’re interested.

I can make a much simpler version, give me a bit.

Ok, lol. I was 60% sure I was doing it the most complicated way possible. Thanks a lot. @tmac430, this guy knows more than me about randomizing.

1 Like

okay thank you so much guys


the second set of randoms can be set to whatever values work for you, and the spawns will spawn your selected object at the random coordinate input.

yes I just went into my own game to do this.

thats awesome dude thank you so much im going to start thank you guys so much

2 Likes

why are you using filters for this??

i dont know i just found that on the internet via videos so i used them is there a better way of doing it because that would be helpful to know?