Skip navigation
UArt2
Currently Being Moderated

if else i dont get it

Jan 25, 2012 8:51 PM

Hi and hello.

Here is my tricky problem.

 

I have 5 boxes red_1, green_2, blue_3, black_4 and yellow_5.

All boxes lined up, when i move blue_3 20 pixels to the y position, green_2 and black_4 should move 10 pixels to the y position.

When i move blue_3 back to 0 all others should move back.

So every time i move one of these Boxes the neighbors should move too.

 

Sounds easy but seems to be really hard.

 

Thanks for any tip.

 
Replies
  • Currently Being Moderated
    Jan 26, 2012 4:22 AM   in reply to UArt2

    It's not simple. Say you have an expression that calculates a box's y offset based on where its neighbors are positioned. How do you move that box somewhere other than where the expression puts it?

     

    I think you would need to control things with an external control of some sort. If only one box at a time can move, you could select that box with a slider and the expression on that box would say "I'm selected, I need to move 20 px". The neighbor's expressions would say, "My neighbor is selected, I need to move 10 px". Something like that. It depends a lot on how you are planning on animating things.

     

    Dan

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 26, 2012 12:06 PM   in reply to Dan Ebberts

    Would this be a case for the never-used Checkbox Control effect?

     

    How do you write an if else with the checkbox control? (If it's turned on do this, if it's turned off do that)

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points