How do I : disable collision on invisible area ?

Just started using Construct 2? Post your questions here

Post » Tue Aug 05, 2014 9:51 am

Hi everyone,

i'm really new to construct and i really need help with collision

what i'm trying to achieve is to modify collision area of an object after an event
in my case is :
1. when a bullet collide with a box, it'll destroy a part of box surface and creating a hole
2. after the hole created, that specific area will lose its collision check, so that other object can pass that area

by specific i mean, if the hole is "round", that collision check only outside that "round" area
Image

any ideas would be much appreciated
thanks
You do not have the required permissions to view the files attached to this post.
B
8
Posts: 4
Reputation: 297

Post » Tue Aug 05, 2014 10:34 am

You can try to setup the object and the collision change as an animation. The way to do that is easy. Once you have the object setup as mentioned, you just have duplicate the animation. In that duplicate, change the collision on it as you want.

After that setup events to play the new animation when the box is destroyed. You can also achieve the same thing using frames instead of animations if you want.

Here are a few images to show you how to setup the frames:

Image

Image

Image

Image


Hope that helps
B
19
S
7
Posts: 161
Reputation: 1,751

Post » Tue Aug 05, 2014 11:22 am

Image

hi Vallar,

thanks for sharing
i think that is one way to do it if i want to create a pre-define "hole"
but
what i'm thinking is, we'll never know :
1. how many bullet that player will shoot on the box
2. in which direction the bullet will come or which part of the box the bullet will land

moreover,
the bigger the box, more alternative animation we have to make for all possibilities

i try to browse for some example,
i think what i'm trying to achieve is pretty much similar case to
GUNBOUND (bullet to land collision)
or
WORMS ARMAGEDDON (bullet to land collision)

thanks
B
8
Posts: 4
Reputation: 297

Post » Tue Aug 05, 2014 4:35 pm

Ahh, I see what you mean now. I didn't know that you needed precise collisions based on the player's action. Sorry, I misunderstood what you wanted.
B
19
S
7
Posts: 161
Reputation: 1,751

Post » Thu Aug 07, 2014 1:52 pm

The only solution I can think of in a first moment is to substitute the big object by many smaller object and check collision with them instead. Remember to disable collision for the objects that are inside the big object to improve performance and only enable collision when they are exposed.

Anyway, I'll give some thinking to the issue and see if I can find a more ellegant solution, @echolink!

By the way, which plugin are you using for the mask?
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
16
S
4
G
1
Posts: 435
Reputation: 2,353


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 7 guests