Home   Help Search Login Register  

Author Topic: Island roads  (Read 2393 times)

0 Members and 1 Guest are viewing this topic.

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Island roads
« on: 10 Jun 2008, 15:07:06 »
Are the roads on Sahrani part of a class structure that can be queried via ConfigName and inheritsFrom? Or are they stored in a specific path that can be accessed?
urp!

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Island roads
« Reply #1 on: 10 Jun 2008, 18:49:24 »
Alas and Alack ... No

The road models do not have a config entries.

Consequently they do not have class names.

What do you need classnames for specifically?

The road models and associated files are in ca\roads ... roads.pbo
There is a config file in there but it is only to configure the bridges.
There is also a model.cfg which is also only for the bridges.


Planck
I know a little about a lot, and a lot about a little.

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Island roads
« Reply #2 on: 11 Jun 2008, 01:01:12 »
I was looking for an easy way to identify whether or not a given p3d name was a road. A while ago I wrote a 2D LOS script based on bounding boxes for Blanco's spotlight script, but it was not completely successful. Now since we have proper string manipulation functions I wanted to recycle some of the code into a "find nearest road" script. Is there any way to determine if a given map p3d is in ca\roads?
urp!

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Island roads
« Reply #3 on: 11 Jun 2008, 15:32:28 »
I would say if the road names begin with:

asf*.p3d    asphalt
ces*.p3d    dirt
kos*.p3d    cobbled
kr_*.p3d    T-piece or crossroad
sil*.p3d    main road


then they are road models


Planck
« Last Edit: 11 Jun 2008, 15:37:32 by Planck »
I know a little about a lot, and a lot about a little.

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Island roads
« Reply #4 on: 11 Jun 2008, 15:54:33 »
I was afraid of that. A solution, but not a very portable one.
Tangential Question:
Do you know how/where ArmA stores the road pathfinding? Airport ILS data is accessible via config...
urp!

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Island roads
« Reply #5 on: 12 Jun 2008, 11:45:58 »
The road models themselves have the pathway incorporated into them, its called the Roadway LOD.

Joining the road pieces together then creates a longer pathway ... etc.

Airfield ILS data is just a collection of waypoint co-ordinates specific to the current map of course

ilsPosition, ilsDirection, ilsTaxiIn and ilsTaxiOff.

ilsPosition: This is the point on one end of a runway that the aircraft aims for when landing. (X,Y)
ilsPosition[]={9765,9951}; ... for example.

ilsDirection: This is the direction your runway runs in for landing, together with the glideslope value (X,Z,Y)
For example if you are landing from the south, heading north (0), you then take the opposite compass bearing (180) and the first number is the sin of this value (sin180).
The second number is the sin of the desired glideslope value, standard value for OFP was 0.080 (about 4.6 degrees).
The last number is the cos of the compass bearing used in the first number (cos180).

ilsTaxiIn and ilsTaxiOff: These are waypoint coordinate pairs held in an array, they define the points for the plane to head for when taxiing after landing (ilsTaxiOff) and for take off (ilsTaxiIn).
The first number pair for ilsTaxiOff is usually the same as ilsPosition.

 :blink:

Planck
I know a little about a lot, and a lot about a little.