Page 1 of 2

Enable/disable see-saw

PostPosted: Wed Feb 12, 2014 7:09 pm
by caiorosisca
How can I enable and disable a see-saw?
I'm making a physics puzzle and I only want the see-saw to work when I press the play button, before that it needs to stay locked to it's start position/rotation.

Re: Enable/disable see-saw

PostPosted: Wed Feb 12, 2014 7:54 pm
by LittleStain
Couldn't you just set physics disabled on start of layout and on play button pressed set physics enabled?

Re: Enable/disable see-saw

PostPosted: Wed Feb 12, 2014 8:06 pm
by RamPackWobble

Re: Enable/disable see-saw

PostPosted: Wed Feb 12, 2014 8:54 pm
by caiorosisca
@LittleStain, disabling the physics also affects the joints, it's just like removing them.
@RamPackWobble, I'll update my Construct and try your capx(runnign v.158 here)

Re: Enable/disable see-saw

PostPosted: Wed Feb 12, 2014 8:57 pm
by RamPackWobble
all it does is sets physics on object to immovable and then on space pressed sets physics to movable...

Re: Enable/disable see-saw

PostPosted: Wed Feb 12, 2014 9:53 pm
by caiorosisca
Tried that also @RamPackWobble, it just stayed immovable even after setting it back to movable.

Re: Enable/disable see-saw

PostPosted: Wed Feb 12, 2014 10:22 pm
by RamPackWobble
That all I did but it appears to work - did you try the capx ?

Re: Enable/disable see-saw

PostPosted: Thu Feb 13, 2014 8:25 am
by RamPackWobble
slight change to the above capx - see-saw can now also be "re-frozen" to its position (made un-movable)

demo

Re: Enable/disable see-saw

PostPosted: Thu Feb 13, 2014 8:33 am
by LittleStain
Just thinking, but you could also fake it completely, by only creating the seesaw when needed and replacing it with sprites without behaviours when not needed.

Re: Enable/disable see-saw

PostPosted: Thu Feb 13, 2014 11:47 am
by caiorosisca
Thanks guys, I'm not sure what was wrong, I must have missed something. I rebuilt the whole level from 0 following @RamPackWobble's demo and it worked.