Update: JustSid, please try this updated version. This should work. There was an error in the Löve2d Wiki frown
https://www.dropbox.com/s/lc63906os89qyby/trAInsported.love
Note though that this will take a long time to load, because it can't find out the number of CPUs and will only use one thread because of it.

Originally Posted By: txesmi
I have a question. Witch AI will pick up the first passenger in the case that two AIs create their first train beside it?

I mean, there might be a rule to solve the preference. Something like the win percent from low to high rates.

Salud!


I thought long about these kind of issues -> right now, there is no determinism in the game. What AI starts and is executed first is random at this point. However, the ai.foundPassengers is only executed when the train comes to a new tile. So if you create the train ON the tile where the passenger is sitting, then he/she won't be picked up.
Also, if you try to create a second train on the same tile, this second tile will wait until the tile is free.

Last edited by Germanunkol; 02/26/13 21:42.

~"I never let school interfere with my education"~
-Mark Twain