GoblinAPI - Unrotate example

This is a longer example plugin.  When executed, the plugin removes any rotation assigned to all selected objects (setting it to 0).  This is a good example of how to cycle through all the objects on a map to perform a task.

To install, save as 'Unrotate.FMScript' in FM8's \Plugins\ directory.  This plugin creates a Unrotate (Set to 0 degrees) menu item in the Plugins menu.

#plugin    Unrotate (Set to 0 degrees)

oMap = GetCurrentMap()

For i = 1 to oMap.ObjectCount
   o = oMap.GetObject( i-1)
   If o.selected Then
      o.Rotation = 0
   End If



Last edited by NBOS on 2007-09-04 01:29:15
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