Posts: 4,878
Threads: 85
Joined: Jun 2007
Reputation:
0
I think it could be possible, but if you are new to scripting, it will be very hard.
To explain my idea in short: Check via positions and vehicle velocity if the vehicle is going to hit the npc
if yes, stop his recording playback and kill him or apply an animation to him, so he is not blocking the car.
Posts: 6
Threads: 1
Joined: Aug 2010
Reputation:
0
yes thats my idea, its not a problem to check positions, or velocity (i thought the same way lol),
i have problems with:
when should i check position (dont know if i should use callback(for example OnPlayerUpdate()) or Timer),
and where did i get vehicle-dimensions if vehicle is killing npc while drifting (in any rotation) or something?
Ty for fast response...
Posts: 4,878
Threads: 85
Joined: Jun 2007
Reputation:
0
If your server is fast enough, you could use OnPlayerUpdate, but a 200-300 ms timer should be fine too.
The dimensions will be the major problem, did not thought about this yet. You could calc the point the vehicle will be at in 300ms or so, and then check the distance to the position of the npc, but this wont be very accurate, especially for too long or too short vehicles. Maybe this works fine enough, else you would have to "map" the vehicle dimensions, and thats a lot of work. I think no one did this before or at least did not publish the result.