How do I check "On collision with "All Solids"?

Get help using Construct 2

Post » Thu Dec 25, 2014 11:25 am

Hello there, this seems like a simple problem, yet I have searched and cannot find an answer referring to Construct 2, only Classic.

Was this removed in Construct 2 (Attributes/Solids from the "On collision with object")? If not how do I use it, and if it was removed, must I put all my solids in a family and check the family instead?

Thank you!
B
8
S
1
Posts: 28
Reputation: 906

Post » Thu Dec 25, 2014 11:29 am

First you must put every coolision object in a familie and then:
Add event -> select the object -> "On collision with another object"-> choose coolision object

Read this:
https://www.scirra.com/manual/142/families
Last edited by EyeForcz on Thu Dec 25, 2014 11:49 am, edited 2 times in total.
Read this:
yeah, i really like to say that you should "Read this:"
B
14
S
7
Posts: 138
Reputation: 1,740

Post » Thu Dec 25, 2014 11:38 am

Wolph wrote:Hello there, this seems like a simple problem, yet I have searched and cannot find an answer referring to Construct 2, only Classic.

Was this removed in Construct 2 (Attributes/Solids from the "On collision with object")? If not how do I use it, and if it was removed, must I put all my solids in a family and check the family instead?

Thank you!


Never used Classic but yes the Family option would do it and is the better option anyway IMO.

@EyeForcz I think he wants a trigger whenever a sprite collides with 'any' solid object.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Thu Dec 25, 2014 11:49 am

@codah thanks for correcting
Read this:
yeah, i really like to say that you should "Read this:"
B
14
S
7
Posts: 138
Reputation: 1,740

Post » Thu Dec 25, 2014 8:04 pm

Thank you for the replies, I was referencing this post https://www.scirra.com/forum/destroy-single-instance-of-bullet-projectile_t70613.

So looks like using Families is the correct procedure in Construct 2? Id rather like a way to check for all solids other than using Families, or at least know if there is another way.

Thank you!
B
8
S
1
Posts: 28
Reputation: 906

Post » Thu Dec 25, 2014 8:47 pm

I don't think there is another way besides making a condition for each object with a solid behavior. Hence using a family is best option.

One thing to note, if you have multiple objects with a behavior, and then add those objects to a family, you won't be able to use actions from those behaviors if you're referencing the family. You'd have to add the behavior to the family instead. Same for instance variables I think.

So if you plan on using lots of objects that share the same behavior, might be better to add the behavior to the family rather than the objects. Same goes for instance variables.
B
48
S
23
G
66
Posts: 1,144
Reputation: 39,059

Post » Thu Dec 25, 2014 10:24 pm

Prominent wrote:So if you plan on using lots of objects that share the same behavior, might be better to add the behavior to the family rather than the objects. Same goes for instance variables.


IMO this is always true and one of the main reasons for having Families. In fact I'd go so far as to say if you have any instance vars or behaviours on an object, use a Family. Maybe a bit extreme for some :)
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 9 guests