02.09.2015, 20:22
[FilterScript] NPC Drivers - Citizen & Fully working Taxi script - (FS-Version)
03.09.2015, 01:29
Update 1.1
Added correct speed calculations for turning angles and steepness.
Added correct speed calculations for turning angles and steepness.
03.09.2015, 01:50
Nice, i made a taxi script too , before u release this one, using FCNPC & GamerZ gps plugin , but mine comes to u even if it\'s very far ^^ ; nice though, i guess this one is better than mine
03.09.2015, 02:13
Quote:
Nice, i made a taxi script too , before u release this one, using FCNPC & GamerZ gps plugin , but mine comes to u even if it\'s very far ^^ ; nice though, i guess this one is better than mine
|
Well that\'s configurable, but I wanted some realism
03.09.2015, 02:22
So much effort..Well done.
04.09.2015, 18:24
Is This Fs supported for the version of samp 0.3.7 r2-1?
04.09.2015, 18:27
04.09.2015, 19:05
I\'m a bit confused because of your FCNPC_OnReachDestination callback. Why is the code so complicated and what\'s the purpose of all this quaternion calculation? I created a similar system a while ago and the code was a lot shorter. I guess I\'m not understanding some functionality and it\'s necessity in your script.
[ame]www.youtube.com/watch?v=b3i4jcEBcP0[/ame]
[ame]www.youtube.com/watch?v=b3i4jcEBcP0[/ame]
pawn Code:
new Float:pos[3], Float:cpos[3], Float:speed, nodeid = TaksoNPC[i][tCurrentNode];
GetNodePos(TaksoNPC[i][tNode][nodeid], pos[0], pos[1], pos[2]);
GetNodePos(TaksoNPC[i][tNode][nodeid - 1], cpos[0], cpos[1], cpos[2]);
new Float:a = GetAngleBetweenPoints(cpos[0], cpos[1], pos[0], pos[1]) + 90.0;
pos[0] += (2.5 * floatsin(-a, degrees));
pos[1] += (2.5 * floatcos(-a, degrees));
if (GetDistanceBetweenPoints(pos[0], pos[1], pos[2], cpos[0], cpos[1], cpos[2]) < 6.0) speed = 1.0;
else speed = 2.0;
FCNPC_GoTo(npcid, pos[0], pos[1], pos[2], MOVE_TYPE_DRIVE, speed, true);
04.09.2015, 20:39
I dont know all the details but we used quaternion calculations to make the drivers drive their steep roads more perfect. In older versions the back of the car went stuck inside the road on steep hills if i remember correctly.
It all might seem to be far fetched but its all to make it look smoother.
It all might seem to be far fetched but its all to make it look smoother.
04.09.2015, 22:43
Quote:
I\'m a bit confused because of your FCNPC_OnReachDestination callback. Why is the code so complicated and what\'s the purpose of all this quaternion calculation? I created a similar system a while ago and the code was a lot shorter. I guess I\'m not understanding some functionality and it\'s necessity in your script.
www.youtube.com/watch?v=b3i4jcEBcP0 pawn Code:
|
Also random rotation bugs are appearing, look this:
http://s22.postimg.org/nn6jy04sx/adss_jpg_000009.jpg (The vehicles seen here are still normally moving along the road, turned by ~30°)
http://s22.postimg.org/a4znlpsnl/adss_jpg_000159.jpg (X rotation isn\'t set)
But that\'s only a small part, the speed calculation takes a bit more room, but isn\'t really much code.
In the new version, to save resources, these calculations wont be done when nobody is around.
In the future I also want to calculate the Y rotation too (to the sides).
PS the code you posted looks exactly like the one in my first version
05.09.2015, 10:07
Yes exactly right now the motorbike drivers look kinda weird when they turn on an intersection ..they dont lean to the side if you know what i mean..thats the Y rotation i think..anyways..
If some math genius out here knows how to handle with quaternion calculations like that and if you have time and are willing to help in that part?
Then please hit me with a PM ( yes me so NaS can focus on other things concerning this script) .
If some math genius out here knows how to handle with quaternion calculations like that and if you have time and are willing to help in that part?
Then please hit me with a PM ( yes me so NaS can focus on other things concerning this script) .
05.09.2015, 11:39
So that\'s the reason why your script acts a lot better on slopes. The only disadvantage is that it doesn\'t look as smooth when taking curves. I really like what you\'ve done here, the NPCs just can\'t be perfect yet. You should save Drivers[driverid][nCurNode] in a variable in the FCNPC_OnReachDestination callback, it would make the code look a lot better and it should be a tiny-tiny bit faster as you\'re using it many times.
05.09.2015, 12:00
Quote:
So that\'s the reason why your script acts a lot better on slopes. The only disadvantage is that it doesn\'t look as smooth when taking curves. I really like what you\'ve done here, the NPCs just can\'t be perfect yet. You should save Drivers[driverid][nCurNode] in a variable in the FCNPC_OnReachDestination callback, it would make the code look a lot better and it should be a tiny-tiny bit faster as you\'re using it many times.
|
But I get closer with every little thing I add, so let\'s see what\'s possible..
For the next version, ColAndreas will be needed for that.
This fixes many broken GPS nodes during route calculations and also 95% perfect rotations on the X axis. Even in tunnels or on more "detailed" surfaces.
And it\'s not any slower than MapAndreas.
For the CurNode variable, I will do it for the next version, also many other little improvements.
05.09.2015, 12:03
Good job bro,
06.09.2015, 12:12
How to fix FCNPC Exception Handler?
07.09.2015, 10:31
08.10.2015, 15:08
I can\'t load plugin FCNPC
12.10.2015, 17:34
Good
12.10.2015, 19:43
06.11.2015, 13:33
Good job!
« Next Oldest | Next Newest »
Users browsing this thread: 18 Guest(s)