Need help moving vehicles separately

Hello! I’m quite

new to Delight EDU, so I’m still learning how to code. I’d like to use it in my game to make a car and a bicycle move separately. For example, I want the car to drive across the street first, followed by the bicycle.

I can provide a screenshot if you could help me figure out what’s going wrong. I’ve been using the true/false scene settings to make sure they move separately, but I haven’t quite managed to get it working yet.

Thanks in advance for your help!

Sry I don’t really understand your language so can you send a picture with English code :smiley: I could help you maybe?

Oh yeh Ofc! Here is a rough screenshot in english

1 Like

Hi there snouk, I can help you fix the code up but one quick question, are you wanting the car to move, and then the bicycle to move. And then after that the process repeats?

(car :right_arrow: bicycle :right_arrow: car :right_arrow: bicycle, etc)

(Also sorry for a late reply)

  • We can use coblock call element idk how to use it but go to YouTube and search Delightex element just like that.
  • Element mean one by one, example, When one car goes away next car go away too, just repeat and repeat until there no car left.Hope it help :smiley:

You can use wait second coblock to wait second transport to go.Why are there a girl when you coblocking?What do the girl need to do? Walk by her self first and wait a little bit and transport start going?

Yes exactly that! (Sorry for the late reply as wel lol i was on vacation so i didnt have a lot of time)

2 Likes

Uhh wdym? There is no girl only the man riding the bycicle.

1 Like

Hi cheng,

I have indeed tried using that (without the tutorial) And It Would just not work but I Can Try using it with the tutorial And See if I can get it to work!

1 Like

Yooo finally my first solve ever!:smiley: Click the solve button on my solve reply!It will mean i his solve your problems!You just reply to me 24mins ago!

Hi snout, Is this what you were after?

Basically once the car finishes, the bike moves, and then the car and then so on and so forth. If your trying to get them to move at the same time as each other, the problem is that your setting one to invisible and the other to visible, so it may look like only the car or only the bike is moving along the path. Also I believe the problem you had before (if the link I sent you is what your after) is that the repeat until false is used for variables. For eg you could have a “moving variable” while the car is moving set it to true and once it finishes false, and then it will stop. The code I like to use for these kind of things is

run separately→forever→(code)

Which basically repeats whatever is inside the forever loop, and the run separately part just means it doesn’t interfere with other code below it. Because if the forever code isn’t isolated it will stop anything below the code

Here an explanation for the code in the link I sent you so you can use those sorta things in the future. I explained the run separately and forever part above. Basically it starts by making the person and the bicycle invisible, makes the car visible, moves it along a path (you can also use things like move forward X meters, or move to (position of X object) etc etc) and then makes it invisible when it reaches the end of the path, turns it into a random colour, and then the bicycle and man is turned visible, and does exactly what the car does. and then once it’s finished it repeats the cycle. So the car will be visible and move, turn invisible and then the bicycle will turn visible, move, turn invisible, etc.