Users browsing this thread: 3 Guest(s)
Super Minecraft 2D- fangame wip
#7
Hmm... Since you're making this in Game Maker, I'll actually be able to help you.


Here's my idea. Have two types of blocks. Normal blocks that just sit there, and the blocks that's just been placed. These blocks check (in their Step Event) whether there's a free place below them; if so they move one snapping value down (assuming it's only possible to place blocks at snaps). Whenever there's a block below it, it changes into a normal block.

Now, it doesn't end here, because we want blocks to fall down when the foundation below them are taken away. We could do this with a recursive script...

//start_to_fall()
me = place_meeting(x,y - 16,obj_block_normal)
with(me){
instance_change(obj_block_falling,false)
start_to_fall()
}

Put simply, it finds the first block above the calling position (let the normal blocks call this script in their destroy event), tells it to fall downwards, then THAT block finds the block right above it, tells it to fall downwards... and so on.
Thanked by:


Messages In This Thread
Super Minecraft 2D- fangame wip - by 8thMan - 04-11-2011, 07:48 AM
RE: Super Minecraft 2D- fangame wip - by Dazz - 04-11-2011, 08:29 AM
RE: Super Minecraft 2D- fangame wip - by 8thMan - 04-11-2011, 08:41 AM
RE: Super Minecraft 2D- fangame wip - by Dazz - 04-11-2011, 09:48 AM
RE: Super Minecraft 2D- fangame wip - by 8thMan - 04-11-2011, 12:50 PM
RE: Super Minecraft 2D- fangame wip - by alecpike - 04-11-2011, 01:10 PM
RE: Super Minecraft 2D- fangame wip - by Yal - 05-05-2011, 07:30 AM
RE: Super Minecraft 2D- fangame wip - by Yal - 05-09-2011, 10:07 AM
RE: Super Minecraft 2D- fangame wip - by Proton - 05-11-2011, 05:27 PM

Forum Jump: