Push Block problem ~sort of...

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
User avatar
Isaac
Posts: 3190
Joined: Fri Mar 02, 2012 10:02 pm

Push Block problem ~sort of...

Post by Isaac »

It would be a great thing to implement logical gravity on these anti-gravity stones. 8-)
Currently if the push block floor is set to a different level, the blocks ignore the [height] gaps in the floor, (though of course... still allowing the blocks to be pushed across them). It makes technical sense, (I suppose it's checking that the next tile is an active push block floor tile; but it completely ignores the height of the floor.
https://www.dropbox.com/s/p311y15mbdxly ... k.avi?dl=0

While I'm sure it was never intended... if the blocks can be made to fall when the push-floor is a level lower... then it opens up quite a lot of potential for puzzle design, I'd think.

BTW, Klotski is a favorite game for me; I'm looking forward to some fun with this new puzzle prop. 8-)

** Would it (or is it) possible to script a push on a block?
Batty
Posts: 509
Joined: Sun Apr 15, 2012 7:04 pm

Re: Push Block problem ~sort of...

Post by Batty »

I *think* the way to do it will be to add an animation component to the block's definition:

Code: Select all

components = {
      {
         class = "Animation",
         animations = {
            dropBlock = "assets/animations/puzzles/heavyDrop.fbx"
         }
      }
}
Then have a script trigger the dropBlock animation when the block moves above the square. Also, you will need a large splash sound and particle water spray everywhere. :lol:

There is a gravity component that monsters have in the editor, that may do something when added to the blocks.

All speculation without the reference but I think this new component setup will be able to do just about anything. :)
Last edited by Batty on Thu Nov 06, 2014 12:26 am, edited 2 times in total.
User avatar
Skuggasveinn
Posts: 562
Joined: Wed Sep 26, 2012 5:28 pm

Re: Push Block problem ~sort of...

Post by Skuggasveinn »

I think you will also have another issue, the pushblock doesn't have a party collider from above
So if the party can get above the pushblock they can fall right into it.
So you would also need to spawn an invisible platform above the pushblock (in the main campaign there was always the lightbridge thingy above the pushblocks if you could get above it and walk on top of it, to stop the party from falling in)

but knowing you, you will obliterated this problem :D

Skuggasveinn.
Link to all my LoG 2 assets on Nexus.
Link to all my LoG 1 assets on Nexus.
User avatar
Chimera005ao
Posts: 187
Joined: Sun Jun 29, 2014 8:34 am

Re: Push Block problem ~sort of...

Post by Chimera005ao »

BTW, Klotski is a favorite game for me; I'm looking forward to some fun with this new puzzle prop. 8-)
Stapling two or more push blocks together to form larger push-able blocks sounds like it'd be very fun. : 3
Especially if you could have multiple levels, with ladders attached to them. :twisted:
User avatar
Isaac
Posts: 3190
Joined: Fri Mar 02, 2012 10:02 pm

Re: Push Block problem ~sort of...

Post by Isaac »

Chimera005ao wrote:
BTW, Klotski is a favorite game for me; I'm looking forward to some fun with this new puzzle prop. 8-)
Stapling two or more push blocks together to form larger push-able blocks sounds like it'd be very fun. : 3
Especially if you could have multiple levels, with ladders attached to them. :twisted:
I think a scripted push feature would be the key to some puzzles like this... more in the way of Mahric's scavenger pawn from the ORRR2.
It'd be nice to have them fall through pits as well. 8-)
Batty wrote:All speculation without the reference but I think this new component setup will be able to do just about anything. :)
I've only just opened the editor last night, I'm still new to the component system. I'm still playing my 1st run on the game; but that sounds promising.
User avatar
Chimera005ao
Posts: 187
Joined: Sun Jun 29, 2014 8:34 am

Re: Push Block problem ~sort of...

Post by Chimera005ao »

more in the way of Mahric's scavenger pawn from the ORRR2.
Which was amazing, and I wish I knew how that worked.
BlankDiploma
Posts: 3
Joined: Tue Oct 21, 2014 8:19 am

Re: Push Block problem ~sort of...

Post by BlankDiploma »

Hey, I've been have a related problem with pushblocks that I believe to be an outright bug.

If you have a two-level pushblock puzzle (e.g. with one set of floors and blocks at z=0 and another set of floors and blocks at z=1), the blocks on the upper floor can be pushed anywhere that overlaps an activated floor on EITHER z-level. Surely blocks should only respect the state of the floor on their own level? I'm really hoping this can be fixed because it has totally killed a great idea for a puzzle.
User avatar
Isaac
Posts: 3190
Joined: Fri Mar 02, 2012 10:02 pm

Re: Push Block problem ~sort of...

Post by Isaac »

BlankDiploma wrote:Hey, I've been have a related problem with pushblocks that I believe to be an outright bug.

If you have a two-level pushblock puzzle (e.g. with one set of floors and blocks at z=0 and another set of floors and blocks at z=1), the blocks on the upper floor can be pushed anywhere that overlaps an activated floor on EITHER z-level. Surely blocks should only respect the state of the floor on their own level? I'm really hoping this can be fixed because it has totally killed a great idea for a puzzle.
The root cause is is the same issue.
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: Push Block problem ~sort of...

Post by Drakkan »

guys pls help with script, I need door1 to be opened when three pushable_floor_triggers (called trigger1, trigger2, trigger3) have pushable_block (called block1, block2, block3) on them. I tried to play with counters, but there is only activation by item, not by object :/
Also there should be some plate(plate1), which when activated, will teleport block1-3 to its original position (reset). Thanks for any help
Breath from the unpromising waters.
Eye of the Atlantis
User avatar
Isaac
Posts: 3190
Joined: Fri Mar 02, 2012 10:02 pm

Re: Push Block problem ~sort of...

Post by Isaac »

Drakkan wrote:guys pls help with script, I need door1 to be opened when three pushable_floor_triggers (called trigger1, trigger2, trigger3) have pushable_block (called block1, block2, block3) on them. I tried to play with counters, but there is only activation by item, not by object :/
Also there should be some plate(plate1), which when activated, will teleport block1-3 to its original position (reset). Thanks for any help
Place this in a script and connect all three plates.

Code: Select all

function checkBlocks()
	local plate = {
				   {trigger1.x, trigger1.y},
				   {trigger2.x, trigger2.y},
				   {trigger3.x, trigger3.y}
				  }
				 
	local block = {
				   {block1.x, block1.y},
				   {block2.x, block2.y},
				   {block3.x, block3.y}
				  }
			
 	for z = 1, 3 do
		for w = 1,#plate do
			if plate[z][w] ~= block[z][w] then
				return
			end
		end
	end
	door1.door:open()
end
Post Reply

Return to “Mod Creation”