Help, tutorials and examples for Game Maker

Paper Flight
click to visit
3D racing game with custom paper airplanes.

Endurance 3d
click to visit
A survival game with many weapons and enemies.
Platformer Engine
click to visit
An Engine to help you start a 2D Platformer Game.

Infinite Stick War of Death V3
click to visit
The third remake of the epic, endless war God has started.
Home Search/Browse Comments Trollsplatterer You can help! Links
Terms&Conditions This website has been designed for Firefox Design by Trollsplatterer (©2018)

Destructible Terrain  download now

This example explains how to create destructible terrain. It subtracts an explosion-sprite from a land-sprite to create a new sprite that's used for the land-object. This method requires the pro-version, though.


General Rating
Your Rating*


By Comment
JSgOyQfJzV WhHmzTQluU PpBAvolaov SduraCbpkr aTQizaOaNz SHXWgwRzZE EZwEYOngYN RNQkcJlBrt JkcNVvfzpB siVLidkihZ
Indeed, I hadn't thought of that. You can use the deactivation of instances to fix this:
- Make a hole in the instance you collide with
- Decativate this instance
- Repeat this until there's no more collision
- Activate all instances again.

I'll see to it that this is added to the example.
This works great, but the only problem is when 2 are placed near or on top of each other. Either only 1, or neither of them are affected. I know this is difficult to handle in GM, so it's not something I can count you off for :) Nice job!
Really nice.
There is an explosion, but there's no surface-creation when there's no land object. The code already checks for a collision with land (instance_place(x,y,landobject)). If there's no land, the code stops (break).
change in object landdesructor the create event to a collusion event and it will only give the effects and destroying when he get that collusion with the land. I think this is better because now you can destroy air (it won't destroy but it gives an effect) :D
Real cool!

* : The rating makes use of your IP-address to remember your vote. IP addresses may change, but your vote will be kept, even though it may no longer be visible here.