Re: [nbos] [AS] Creating Routes
"Shade Tree"
Fri Feb 23rd, 2007


I'm having one last problem

Route.RouteLabel = "StringName"

it creates the route just fine but instead of being unassigned it, I assume,
is toggling it as "stringname". However it's not updating the program so I
cannot filter via the routename or even delete the script created routes. I
hope I was clear with that.

Anyhoo, you can see what I'm working on here:

There is a traderoute2.jpg as well but it is huge

Large Lines: Major Trade Routes between two systems with more than
30,000,000 population each, no farther than 50 LY apart
Small Lines: Minor Trade Routes between a Major system and a system with
population over 150,000, no farther than 10 LY apart
Dotted Lines: Outpost Routes between either a Major or a Minor system and a
system with over 150 population total, no farther than 5 LY apart.

I still need to mess with the whole thing to get it to choose a bit more
intelligently but I think it creates great results as is and alot quicker
than doing it by hand ;)

>From: NBOS Support <>
>Subject: Re: [nbos] [AS] Creating Routes
>Date: Fri, 23 Feb 2007 02:23:49 -0500
>At 12:21 AM 2/23/2007, you wrote:
> >I have two system objects loaded in the script and I would like to
>create a
> >route between the two.
>Assuming you have 2 body objects (body1, body2) - both MUST be root objects
>of their system - you can make a route like this:
>Set Sector = GetCurrentSector()
>Route = CreateRoute()
>route.Name = "My Route Name"
>route.Red = 1 'route colors go from 0 to 1, not 0 to 255
> = 1
> = 1
>Route.LineWidth = 1
>Route.LineStyle = 1
>wp = CreateWaypoint()
>wp.Body = body1
>wp.ID = body1.IDString
>wp.x = body1.x
>wp.y = body1.y
>wp.z = body1.z
>Route.AddWaypoint wp
>wp = CreateWaypoint()
>wp.Body = body2
>wp.ID = body2.IDString
>wp.x = body2.x
>wp.y = body2.y
>wp.z = body2.z
>Route.AddWaypoint wp
>Sector.AddRoute Route
>There's a much larger example in the XML Import script. Thats a very good
>script to look at as it creates an entire sector - including routes,
>subsectors, etc - from external data
>Nbossoftware mailing list

Find a local pizza place, movie theater, and more….then map the best route!

Nbossoftware mailing list

Copyright © 2003-2007, NBOS Software. All rights reserved. 'Fractal Mapper', 'ScreenMonkey', 'Character Sketcher', 'Inspiration Pad', 'Fractal World Explorer', 'Goblin API', 'AstroSynthesis' are trademarks of NBOS Software. 'Dwarven Beserker' art by V. Shane.
Member contributed resources