Author Topic: Anyone remember this post - position duplication via script  (Read 484 times)

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
Anyone remember this post - position duplication via script
« on: October 18, 2013, 05:11:15 pm »


                Hi Guys,
A good while back I asked for a function/help making a function that could reconstruct the positions of placed objects and then spawn objects in the same relational position at a new location.



Eg

-----------------------------
|            o 
|
|      o       x           o
|
|                o
|-----------------------------

Eg: the o's are objects or waypoints arranged in a pattern around x (the center point)


I would then like to be able to reference that center point, and duplicate the pattern of objects around it at another location.


This would be useful for me placing designs in toolset in one area - eg: creating complex glyph designs by hand, and then having them spawned elsewhere by script.

There was definitely a post where someone like ShAdoOw had provided the entire function that did what I needed.
However the search functionality on this forum is a little lacking.

It might have been over a year ago.
               
               

               
            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
Anyone remember this post - position duplication via script
« Reply #1 on: October 18, 2013, 07:04:05 pm »


               If you have the positions for all the objects, all you would have to do is find the average of the vectors to get the center point.  If you know the center point you would just need to subtract its position from the position of each object to get their position relative to the center.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Anyone remember this post - position duplication via script
« Reply #2 on: October 19, 2013, 03:36:48 am »


               Script Request/Consult
               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
Anyone remember this post - position duplication via script
« Reply #3 on: October 19, 2013, 12:30:35 pm »


               Thanks Lightfoot8
I had been trying to remember its title for the search tool- I prob shoulda named it better. Lol
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Anyone remember this post - position duplication via script
« Reply #4 on: October 19, 2013, 11:22:21 pm »


               Yea,  I had to google the site for "relative position" to find it and that was only because I half remembered what I named the functions.
               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
Anyone remember this post - position duplication via script
« Reply #5 on: October 20, 2013, 01:31:38 am »


               Lightfoot8 have you considered putting an erf'ed version onto either vault with a short explanation of what it does?

TR