I am currently working on a script to improve vehicle chasing when the player is in a police vehicle with traffic AI. What I have done so far is to slow down time, switch to the suspect vehicle, the switch back to the player vehicle. However, I had to disable this, because it seems make the police AI think that the player vehicle is the suspect vehicle. My new idea is to to "track" the suspect vehicle with a large / high enough marker, which is then visible from the player's vehicle, much like how the van in the "Ran in a Van" chase scenario in East Coast, USA is tracked should the player be a certain distance from the target vehicle: I would need to increase the scale / height of these markers, so that it can be seen by the player from a far distance. Could anyone please point me in the direction of how to accomplish this? Thank you!
You can use code like this to create a marker and make it follow the player vehicle: Code: local M = {} local arrowObj = nil M.createObject = function() if arrowObj then return end arrowObj = createObject("TSStatic") arrowObj.shapeName = "/art/shapes/arrows/s_arrow_floating.dae" arrowObj.scale = Point3F(10, 10, 10) -- scale, in this case very large local pos = getPlayerVehicle(0):getPosition() -- insert position of target vehicle, update each frame arrowObj:setPosRot(pos.x, pos.y, pos.z + 10, -0, -0.7, 0.7, 0) -- arrow pointing down arrowObj.instanceColor = Point4F(1,0,0,1) -- RGBA format arrowObj:registerObject('Target_Arrow') -- unique name end M.onPreRender = function() if arrowObj then local pos = getPlayerVehicle(0):getPosition() pos.z = pos.z + 10 -- increase height, so that marker is above vehicle arrowObj:setPosition(pos) end end return M You would have to make some adjustments, so the marker follows the correct vehicle.