Re: AW: Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
JustinAn - 02.09.2015
Quote:
Originally Posted by NaS
They are in plugins/plugin_includes
I\'ll move the folder in the next version.
|
yeah my mistake for not seeing that
AW: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
NaS - 03.09.2015
Update 1.1
Added correct speed calculations for turning angles and steepness.
Re : NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
nicolaskettler - 03.09.2015
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
AW: Re : NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
NaS - 03.09.2015
Quote:
Originally Posted by nicolaskettler
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
|
This one is about 2 years old now
Well that\'s configurable, but I wanted some realism
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
trablon - 03.09.2015
So much effort..Well done.
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
Jastak - 04.09.2015
Is This Fs supported for the version of samp 0.3.7 r2-1?
AW: Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
NaS - 04.09.2015
Quote:
Originally Posted by Jastak
Is This Fs supported for the version of samp 0.3.7 r2-1?
|
For me it works without any problems, but I also heared some people had problems with the newest version and FCNPC.
I don\'t know if this is only happening for Linux, I only tested Windows.
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
kristo - 04.09.2015
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]
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);
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
AIped - 04.09.2015
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.
AW: Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
NaS - 04.09.2015
Quote:
Originally Posted by kvann
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:
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);
|
Because the x/y rotation of the vehicle wont get updated to actually drive up/down.
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
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
AIped - 05.09.2015
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) .
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
kristo - 05.09.2015
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.
AW: Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
NaS - 05.09.2015
Quote:
Originally Posted by kvann
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.
|
True.. there is definitely a limit with the current version (with version i mean SAMP and its plugins).
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.
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
Ivan_Ino - 05.09.2015
Good job bro,
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
alibassam - 06.09.2015
How to fix FCNPC Exception Handler?
AW: Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
NaS - 07.09.2015
Quote:
Originally Posted by alibassam
How to fix FCNPC Exception Handler?
|
Can you provide a little more info?
Are you using Linux and/or the newest server version?
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
xXDuno2000ManXx - 08.10.2015
I can\'t load plugin FCNPC
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
Strongerking - 12.10.2015
Good
AW: Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
NaS - 12.10.2015
Quote:
Originally Posted by xXDuno2000ManXx
I can\'t load plugin FCNPC
|
There are some problems with the newest SAMP version which I cannot fix. I also encountered some problems with an old crashdetect version, if you use it you may want to update it.
Re: NPC Drivers - Citizen & Fully working Taxi script - (FS-Version) -
N0FeaR - 06.11.2015
Good job!