Help for car traffic.

Hi
I created an infinite map."Endless Runner with Blueprints"The method
Now, how do I create car traffic?
1391347566_traffic-racer-4.jpg

This is more generic games programming than Android specific, and your link to the method is broken.

Now, I’m making assumptions about your method of endless runner here, but the way you’ll actually put it into practice should be similar. I would probably create a traffic blueprint that has the model of some vehicle, and I would move it forward slower than the player (Or, if your player is actually static and the world moves around him, make the traffic move backwards but at a slower rate to the world). Then, once the traffic vehicle is a certain distance behind the player, I would either delete it or recycle it at a distance far enough ahead of the player that they cant see it pop into existance. I would also probably change the model at this step, as well as the x-coordinate (Assuming X is left to right) to give the appearance that its a different vehicle. If you just destroy it instead, I would also on a semi-random timer spawn more vehicles again far enough ahead of the player so that they don’t see the vehicle spawn in.

With these moving models, simply add some basic box collisions to the traffic vehicles and - if the player collides with it - respawn or display some other failure state.

Note: I don’t actually work very often in Blueprint, but given some of the things I’ve seen people make with it you should almost definitely be able to do the above. Remember to do it in stages, get the vehicles drawing, then drawing and moving, then drawing, moving and colliding. Simple!

Hi Hamedudk,

danm36 is correct, you’ll have better luck re-posting this in the blueprints section but specifying that it’s for Android development.

Thanks to all for the tips

Is there an easier way?
Which uses Ai For do that.:confused: