[FilterScript] Detect Driving on the wrong side of the road
#1

Summary:
In February I made a video proving that you can detect which side of the road someone is driving on, here is the files I created for it.
http://www.youtube.com/watch?v=IUE6NCxJLww

Files:
filterscript, requires zcmd and incognito's streamer
http://pastebin.com/LTJVqbc2

and the more important include
https://paste.ee/r/XdzSF
gone through a few sites, hopefully this ones good!

Description:
obviously reading through the code, it was not created for performance, it was rushed and made just for a video proving that it is possible.
reading over the filterscript you can see how the include is used and how to create more things based off it like detection for driving off the road, or create a driving test or something more creative.

it can be a little complicated to read through, basically there are nodes and navi nodes
nodes are just points on the roads that the ai follow so they don't drive off the road.
in the include they are in the format:

Code:
enum NodeInfo
{
	Float:nodeX,
	Float:nodeY,
	Float:nodeZ,
	link1ID,
	navi1ID,
	link2ID,
	navi2ID,
	link3ID,
	navi3ID,
	link4ID,
	navi4ID,
};
so there's the x y z which should be obvious, then there's the link1ID which is the link 1 ID number (or index) and the navi 1 index.
the link1ID refers to an index in the NodeInfo and refers to node connected to it
the navi1ID refers to an index in NaviInfo and is the navi in between the current node and link1ID
if a node does not have a connecting node then it'll be -1, same for navi links

I only extracted the following information from the data for the navi nodes:
Code:
enum NaviInfo
{
	from,
	to,
	leftLanes,
	rightLanes,
};
and here's a visual of the combined information

the navi nodes aren't really needed and are just holding data, in the picture L stands for left lanes and R stands for...

Conclusion:
There should be enough stuff for someone to do something better with this data, also some of the data is incorrect like nodes having 0 connections but most of the data is there and you could probably just fix it up as you use it.

I will also not be offering much in the way of support for using this.

this explains it in the data format you can find in your gta directory and whats possible to extract from those files:
http://gta.wikia.com/Paths_%28GTA_SA%29
Reply


Messages In This Thread
Detect Driving on the wrong side of the road - by cessil - 24.05.2015, 11:23
Re: Detect Driving on the wrong side of the road - by ZaBraNjeNi - 24.05.2015, 11:28
Re: Detect Driving on the wrong side of the road - by PT - 24.05.2015, 11:34
Re: Detect Driving on the wrong side of the road - by Neutralneu - 24.05.2015, 11:40
Re: Detect Driving on the wrong side of the road - by SiraBots - 24.05.2015, 11:53
Re: Detect Driving on the wrong side of the road - by SpikY_ - 24.05.2015, 12:23
Re: Detect Driving on the wrong side of the road - by AIped - 24.05.2015, 12:35
Re: Detect Driving on the wrong side of the road - by cessil - 24.05.2015, 13:21
Re: Detect Driving on the wrong side of the road - by iWhite - 24.05.2015, 15:47
Re: Detect Driving on the wrong side of the road - by Pottus - 24.05.2015, 16:13
Re: Detect Driving on the wrong side of the road - by cessil - 24.05.2015, 23:53
Re: Detect Driving on the wrong side of the road - by Phaze - 25.05.2015, 00:54
Re: Detect Driving on the wrong side of the road - by AdHaM612 - 25.05.2015, 01:21
Re: Detect Driving on the wrong side of the road - by cessil - 25.05.2015, 02:53
Re: Detect Driving on the wrong side of the road - by kkeeii - 27.05.2015, 05:55
Re: Detect Driving on the wrong side of the road - by n0minal - 27.05.2015, 06:12
Re: Detect Driving on the wrong side of the road - by kkeeii - 27.05.2015, 08:30
Re: Detect Driving on the wrong side of the road - by AIped - 27.05.2015, 09:13
Re: Detect Driving on the wrong side of the road - by Alex Magaсa - 27.05.2015, 13:13
Re: Detect Driving on the wrong side of the road - by Konverse - 27.05.2015, 13:15
Re: Detect Driving on the wrong side of the road - by cessil - 28.05.2015, 03:12
Re: Detect Driving on the wrong side of the road - by Expressovec - 28.05.2015, 03:49

Forum Jump:


Users browsing this thread: 1 Guest(s)