Page 1 of 1

How do I measure the weight of objects?

PostPosted: Wed Sep 16, 2015 4:53 pm
by janlindso
I am making a sprite in Construct 2 that is shaped like a bowl. And I want to spawn objects into it that changes the weight of the bowl. Any ideas how to do this, and some advices how to start? I guess, I should be using the physics plugin, but from there I'm not sure.

So in other words, I want the physics objects to stay inside the bowl, but keep it's physics behaviour.

capx

Re: How do I measure the weight of objects?

PostPosted: Wed Sep 16, 2015 5:05 pm
by spacedoubt
I would give the bowl and the objects a weight variable and then when an object is spawned, just add the object's weight to the bowl's weight. No need for physics.

Re: How do I measure the weight of objects?

PostPosted: Wed Sep 16, 2015 5:54 pm
by janlindso
spacedoubt wrote:I would give the bowl and the objects a weight variable and then when an object is spawned, just add the object's weight to the bowl's weight. No need for physics.


Ha-ha..best advice. Too easy for me to come up with...thanks man!

Is there a way to make physics object don't fall through solid objects.

Re: How do I measure the weight of objects?

PostPosted: Wed Sep 16, 2015 6:03 pm
by R0J0hound
"Is there a way to make physics object don't fall through solid objects."

Yes, you need to make them physics objects as well.

Re: How do I measure the weight of objects?

PostPosted: Wed Sep 16, 2015 6:26 pm
by zenox98
janlindso wrote:Is there a way to make physics object don't fall through solid objects.


From the Manual:

Physics won't respond to objects with the Solid or Jumpthru behaviors. These behaviors are totally redundant when using Physics and have no effect. Instead, use the Immovable property.

Re: How do I measure the weight of objects?

PostPosted: Wed Sep 16, 2015 6:35 pm
by janlindso
Thanks guys. I used the immovable propery according to the manual. Works great.

I have one slight problem with the weight part though. How can I measure the weight of the bowl? Or to say it in another word: how to check if the objects are in the bowl (if the bowl is filled with objects over the rims, they are still a part of the weight).

Re: How do I measure the weight of objects?

PostPosted: Sat Sep 19, 2015 1:50 pm
by janlindso
Updated with capx to show what I got so far. The immovable property isn't really the right way to go I think.