How do I efficiently handle picking up items

Get help using Construct 2

Post » Wed Sep 03, 2014 9:50 pm

Simple question: what is the best way to pick up, say, crate-type items (act as solids when on the ground) that can be thrown, pushed, lifted and gently put down.

Any ideas?

Thanks for reading!
B
7
S
2
Posts: 51
Reputation: 627

Post » Sat Sep 06, 2014 5:05 am

My guess would be something along the lines of, enable the physics behavior on the crate then, when the player is within x distance of crate and clicks it, set the crates position to characters arms x,y. For the throwing part, i'd say have your characters arms set angle towards mouse x,y and when right button clicked, throw the crate towards angle of mouse position. I can see about coming up with a basic layout if you need it.
B
13
S
2
G
1
Posts: 47
Reputation: 1,211

Post » Sun Sep 07, 2014 11:42 am

Good start, how to deal with situations like overlapping with two or more crates at the same time?
B
7
S
2
Posts: 51
Reputation: 627

Post » Sun Sep 07, 2014 8:38 pm

Use the 'Solid' behavior on the crate as well and they will not overlap, they will stack as though they are solid objects. As far as dealing with the rest of it goes, most of it is handled by the physics behavior. If you have 3 crates stacked and knockout the bottom one, the other 2 will fall as though gravity is working on them.

Hope it helps!
B
13
S
2
G
1
Posts: 47
Reputation: 1,211

Post » Tue Sep 09, 2014 4:44 pm

Yeah it sure does, thanks!
B
7
S
2
Posts: 51
Reputation: 627


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, David181, fens and 13 guests