I can’t make a game from example

good evening guys !! my teacher gave me a homework to do the same game that he did, but i have some problems with cars and trees generation/ the gas system/ coins.
here’s the screenshots with my code and teacher’s example. my apologies for my bad english, i hope for your support.
the teacher’s game(mine’s would be in comments):

1 Like

my beginning and code

1 Like

1 Like

Hello, jehtennd

And what are the problems you have with the generation of cars and trees/the gas system/coins? Where are the related events? :eyes:

1 Like

the event with cars is an actions in the “Beginning of the scene” and i can’t “loop” the effect to generate those cars every-time. the trees and etc i didn’t started yet

1 Like

Hi jehtennd, so there is a player car and other cars need to be created so there will always be more cars on the screen. The first car you create is in your At the beginning of scene event. Which means it did get created but the force you applied to it meant it was off the screen before you could even see it. The second car you create is in a sub event of At the beginning of scene with no extra conditions.

This means that both your car creation actions are only happening one time. Did your teacher say what kind of condition to use for car creation? For example using timers? Another thing to think about is are you going to delete the cars when they’re off the screen?

1 Like

nah, he told me to just do the same game as him, without any conditions

1 Like

You dont need to generate the trees, use a tiled sprite and change its Y offset.

You are not doing that in the image, but the player’s car also dont need to move, only move the others.

I don’t know if your teacher said you can’t use extensions, but it will be easier for you if you use the object spawner one.

1 Like

alrighty, thanks!!!

1 Like