Not too long ago I released a small scenario pack called "Cops and Robbers: Maple Leaf Credit Union." The car chase in the second scenario has a police car that uses a detection loop to allow the robber to lose, and to re-engage, the police. So, here's the issue: I want to add a second police car to the chase, but don't want to just duplicate all of the code I've written for the first. The detection loop, as well as the crash detector and respawn system, use functions in order to operate and can be assigned to either car, but it seems that I can only use any given function once within a particular frame, pretty well defeating the purpose. Alternating between one car using the function and the other doesn't seem to pan out. Attached is the current release version of the Lua file. I can provide any clarification if needed.
Hey, can you provide us the modified lua file either here or in a pm so we can have a closer look at it?!
It seems I've lost some of the older working versions, so this will probably have to do. It's basically just the same script, but with the updatePolice() function run twice each frame to refer to both police cars. Obviously it wouldn't work for the timer-based stuff, since those are the same variable between the two vehicles, so those would need further modification.