GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 2010-04-10 13:51:48

Marchal_Mig12
Member
Registered: 2009-05-21
Posts: 72

Destructable Terrain got Screwed

Hi everyone, I found a problem when using the sprite_create_from_surface function in gm8. When I set removeback to true, the sprite will moves slightly as you will notive in the gmk. If I set it to false, it won't move but a white background will appear. I tried something using draw_clear_alpha but it still does not work. I don't have plenty time to explain it all but here it is: www.edm-games.com/gmengines/DEST.gmk

You will find the buggy codes into the object located here: Explosions/obj_parent_explosion ---> Event (collision) with obj_parent_block

Good luck!

Offline

#2 2010-04-15 14:52:02

xot
Administrator
Registered: 2007-08-18
Posts: 1,201

Re: Destructable Terrain got Screwed

Can anyone test this? I don't have GM8.


Abusing forum power since 1986.

Offline

#3 2010-04-15 22:30:54

icuurd12b42
Member
Registered: 2008-12-11
Posts: 303

Re: Destructable Terrain got Screwed

Set the smooth option to 0. What you see is the smooth factor "melting" the edges of your sprite.

Draw a circle on the upper left side of your big wedge/slope. you will see it melt. Move the wegde in the middle of the screen to see the bottom and the right side. the bottom and right will not melt because it's on the limit of the sprite. If it was not (remove the right and bottom line from the sprite) it would melt evenly all arround.

[edit]
It makes for an interesting effect though, with smoothing

Last edited by icuurd12b42 (2010-04-16 00:40:53)

Offline

#4 2010-04-17 01:04:29

Marchal_Mig12
Member
Registered: 2009-05-21
Posts: 72

Re: Destructable Terrain got Screwed

icuurd12b42 wrote:

Set the smooth option to 0. What you see is the smooth factor "melting" the edges of your sprite.

Draw a circle on the upper left side of your big wedge/slope. you will see it melt. Move the wegde in the middle of the screen to see the bottom and the right side. the bottom and right will not melt because it's on the limit of the sprite. If it was not (remove the right and bottom line from the sprite) it would melt evenly all arround.

[edit]
It makes for an interesting effect though, with smoothing

Yes the effect is quite interesting and even more when you set removeback to false and you use draw_clear_alpha(c_white,0) instead of draw_clear(c_white). You should try out this effect, it is pretty cool. Thanks for the explanation thought.

Offline

Board footer

Powered by FluxBB