playMaker

Author Topic: Create a row of objects based on distance  (Read 2583 times)

Vern_S

  • Playmaker Newbie
  • *
  • Posts: 32
Create a row of objects based on distance
« on: April 01, 2015, 10:35:53 PM »
Hi all,

I am trying to figure out the best way to create a row of objects based on an increasing distance variable and then systematically remove the objects as the distance decreases.

For example; The user moves a slider from 3" to 18" and a row of 6 objects are created in a line at 3" intervals. If the user moves the slider to 9" the three objects at 12, 15, and 18 inches are removed.

I have created a version where I lay out all of the objects and use a scaling object to trigger each one turning on or off when but I would like a solution a little bit more elegant then that if possible.

Thanks,
Vern

miketolsa

  • Playmaker Newbie
  • *
  • Posts: 22
  • Just love playmaker !!!
    • 4Buffs Productions
Re: Create a row of objects based on distance
« Reply #1 on: July 08, 2015, 06:37:35 AM »
I am facing the same problem . Could anyone help our on this subject ?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15620
  • Official Playmaker Support
Re: Create a row of objects based on distance
« Reply #2 on: July 15, 2015, 08:18:19 AM »
Hi,

 you could use ArrayMaker

keep a list of all your items in order. and then based on the current index, enable disable all items not within the range around the current index.


 Bye,

 jean