Destructible Terrain

For questions about using Classic.

Post » Mon May 19, 2008 11:50 pm

Could someone telkl me how it works or how to do it. I don't know using canvas, there's just too much that isn't documented.
B
16
S
10
G
5
Posts: 255
Reputation: 3,934

Post » Tue May 20, 2008 7:12 am

The example shows it as it is.

Create a Canvas with your terrain. Create a separate Sprite (for example, in worms, a bazooka hole) which will be erased from the canvas.

Use 'Paste into canvas' with this sprite, then Update collision mask. A hole will be made in the terrain and can be collided with/into.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Tue May 20, 2008 11:08 pm

[quote="Rich":1mmen17r]The example shows it as it is.

Create a Canvas with your terrain. Create a separate Sprite (for example, in worms, a bazooka hole) which will be erased from the canvas.

Use 'Paste into canvas' with this sprite, then Update collision mask. A hole will be made in the terrain and can be collided with/into.[/quote:1mmen17r]

Another note is that the "Paste into Canvas" uses that objects X and Y values, so you need to have an instance of the object where you want it to be pasted. A good idea, if you're using a mask with say a bullet, is to add the mask object to the bullet objects container, and add an event to place the mask object at the bullets position. Alternatively, use "On Bullet overlaps Canvas" -> "Bullet: Create Object 'Hole' at Image point 0" or wherever to erase it.
B
3
S
2
G
4
Posts: 130
Reputation: 1,735

Post » Sat May 24, 2008 3:57 pm

Could I see an example I'm also wanting to do this but I don't understand how you do it.
B
4
S
2
G
4
Posts: 164
Reputation: 2,178

Post » Sat May 24, 2008 4:08 pm

The example is in the uploads forum.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests