rain_gloom Posted October 26, 2013 Share Posted October 26, 2013 What part should I change if I want only a few vehicles to achieve the following? only 1-20 vehicles, but those are always "streamed", so they are always moving and are never destroyed (at least not for coding purposes)get (random) positions on the roadadd vehicles explicitlyengage/disengage into/from traffic it's kind of a huge resource, so I have no idea where should I begin... thx in adv Link to comment
DiSaMe Posted October 26, 2013 Share Posted October 26, 2013 Traffic is created and destroyed in generate.lua file, spawnTrafficInSquare and despawnTrafficInSquare functions. As for positions on road, you can look at load_paths.lua to see where the data is stored. conn_n1[connection_id] and conn_n2[connection_id] are the nodes where connection starts and ends and if it is bent around a node, that node is stored in conn_nb table. The last thing you want to do, linking/unlinking the vehicles to/from traffic, is not something what this resource was designed for. Maybe you could achieve this if you did the same what is done on creation/removal of vehicles, minus the createVehicle/destroyElement calls (using already existing vehicle instead), but the resource itself is not well-designed overall because I was after speed, not flexibility when I was making it. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now