Re: [nbos] [A3] Rotating.
"Robert Graham"
Tue Feb 7th, 2012

Works a treat but is there a way to add routes into this.. ?

I'm guessing it's something simple I'm overlooking like sector.getroutes or
something.. but yeah just curious it's fine if there isn't.


-----Original Message-----
From: []
On Behalf Of NBOS Support
Sent: Monday, 6 February 2012 7:19 PM
Subject: Re: [nbos] [A3] Rotating.

This one works better.... the other one wasnt using the right x value in
the calculation for o.z.

#plugin Rotate Sector
#author NBOS
#desc Rotates sector selected degrees

a = 45 * (3.14159 / 180) 'angle in degrees converted to radians

sector = GetCurrentSector()
j = sector.SystemCount
For i = 1 to j
o = sector.GetSystem( i-1)

x = o.x
y = o.y
z = o.z

o.x = (Cos( a) * x) - (Sin( a) * z)
o.z = (Sin( a) * x) + (Cos( a) * z)

o.Modified = true

If i mod 100 = 0 Then
sector.RenderMessageBig = "Updating " & i & " of " & j
End If

sector.RenderMessageBig = ""

Nbossoftware mailing list

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