How do I effect an objects physics with a function

Get help using Construct 2

Post » Fri Mar 31, 2017 10:39 am

Hi everyone,

Any idea how I can create a function that will apply a physics impulse to whatever calls it? I have a many different objects that don't have a lot in common other than this impulse.

I figure that I will need to pass the UID to the function but I'm unsure about how to pick the object and change its properties from there, any help would be appreciated

Cheers!
B
8
Posts: 21
Reputation: 342

Post » Fri Mar 31, 2017 1:34 pm

Put all objects into a Family and move the Physics behaviour there. Then you can pick anything by UID and apply the impulse.
ImageImageImage
B
71
S
22
G
248
Posts: 3,761
Reputation: 138,073

Post » Fri Mar 31, 2017 8:35 pm

blackhornet wrote:Put all objects into a Family and move the Physics behaviour there. Then you can pick anything by UID and apply the impulse.

Cheers! I'll give it a shot. It looks like ill be recreating some code but I think it will prove worth it.
B
8
Posts: 21
Reputation: 342


Return to How do I....?

Who is online

Users browsing this forum: t redeemed t and 22 guests