How to make a object collide whit just a few sprites?

Get help using Construct 2

Post » Wed Jul 15, 2015 10:43 am

It first seemed like the solution was to disable the collisions of the object, then add the event on collision whit another object to the sprite that was supposed to collide whit the object and then make the action collision enabled for the object and the sprite. Too bad the sprite still doesn't collide into the object and just fall through it. Making this work is a key to may other things working so i would want to know how to make this work.
B
11
S
2
Posts: 262
Reputation: 1,309

Post » Wed Jul 15, 2015 10:48 am

The question is to vague to answer..

When is the collision supposed to take place?
When is the collision not supposed to take place?
If you disable collisions of an object, how is it supposed to detect a collision?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Jul 15, 2015 11:29 am

LittleStain wrote:The question is to vague to answer..

When is the collision supposed to take place? "When a certain sprite collides whit the object. On touch rather said.
When is the collision not supposed to take place? When any other sprite rather then that sprite collides whit the object.
If you disable collisions of an object, how is it supposed to detect a collision?" It's supposed to be disabled to all sprites except one. How i do that is what i ask for.
B
11
S
2
Posts: 262
Reputation: 1,309

Post » Wed Jul 15, 2015 11:50 am

Disabling collisions on an object will disable collisions..
You can't test for collisions if the object doesn't detect collisions..

Are you sure you mean collisions at all or do you want to set the object to solid-behaviour or something..

Otherwise a simple

sprite on collision with object
> action

would be enough, for no other sprites would be affected..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Jul 15, 2015 2:29 pm

It's not very clear what you want... but, a few ideas:
- You can group up your sprites of interest to collide in a family and then create your "sprite on collition with family" to do what you want to do. If your objects collide with an object that is not in your family, it will do no action and it will only collide.
- You can group up your sprites of interest to collide in one family and sprites of interest not to collide in another family... then enable or disable collition to the families instead of individual sprites.
Lead developer at Octeto Studios
Visit our portfolio at: http://www.octetostudios.com/ :)
Facebook || Twitter || Youtube
B
37
S
7
G
5
Posts: 217
Reputation: 5,614


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 18 guests