How do I measure the weight of objects?

Get help using Construct 2

Post » Wed Sep 16, 2015 4:53 pm

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
Last edited by janlindso on Sat Sep 19, 2015 1:49 pm, edited 1 time in total.
Image
B
14
S
4
Posts: 145
Reputation: 1,948

Post » Wed Sep 16, 2015 5:05 pm

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.
B
88
S
43
G
71
Posts: 601
Reputation: 43,669

Post » Wed Sep 16, 2015 5:54 pm

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.
Image
B
14
S
4
Posts: 145
Reputation: 1,948

Post » Wed Sep 16, 2015 6:03 pm

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

Yes, you need to make them physics objects as well.
B
94
S
33
G
114
Posts: 5,357
Reputation: 73,775

Post » Wed Sep 16, 2015 6:26 pm

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.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
86
Posts: 5,489
Reputation: 59,764

Post » Wed Sep 16, 2015 6:35 pm

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).
Image
B
14
S
4
Posts: 145
Reputation: 1,948

Post » Sat Sep 19, 2015 1:50 pm

Updated with capx to show what I got so far. The immovable property isn't really the right way to go I think.
Image
B
14
S
4
Posts: 145
Reputation: 1,948


Return to How do I....?

Who is online

Users browsing this forum: pmerineau and 21 guests