Low wall blockers but allow projectiles?

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!
User avatar
gambit37
Posts: 218
Joined: Fri Mar 02, 2012 3:40 pm

Low wall blockers but allow projectiles?

Post by gambit37 »

Is it possible to make low wall blockers? That is: a low wall that blocks the party but can have projectiles thrown above it?

I can make a wall with an "obstacle" class but it blocks the party from entering the whole tile. I'd like to make it only block on the edge of a tile.

I thought about cloning a door and hiding the model, but one can't throw things through closed doors or grates...
DrKojak
Posts: 23
Joined: Fri Oct 24, 2014 11:19 am

Re: Low wall blockers but allow projectiles?

Post by DrKojak »

Don't know if you can throw objects over mines_support_wall_2 which is a low wall, but that object may help.
User avatar
gambit37
Posts: 218
Joined: Fri Mar 02, 2012 3:40 pm

Re: Low wall blockers but allow projectiles?

Post by gambit37 »

I looked at that one and got excited, but sadly it blocks all projectiles.

It seems as if there's no "obstacle" class that can be used on wall edges but also allows projectiles to pass. Existing "edge blockers" seem to simply be setup as non-openable doors.

It would be great to have a door class that is closed but that allows projectiles to pass. I've not investigated scripting much yet, so perhaps it'll be possible eventually...
User avatar
Jouki
Posts: 127
Joined: Fri Oct 24, 2014 12:57 pm

Re: Low wall blockers but allow projectiles?

Post by Jouki »

gambit37 wrote:I looked at that one and got excited, but sadly it blocks all projectiles.

It seems as if there's no "obstacle" class that can be used on wall edges but also allows projectiles to pass. Existing "edge blockers" seem to simply be setup as non-openable doors.

It would be great to have a door class that is closed but that allows projectiles to pass. I've not investigated scripting much yet, so perhaps it'll be possible eventually...
asi a placebo effect you can use elevation down, the party could go through the pit but you can throw items over the pit :)

EDIT: or you can try This :)
User avatar
gambit37
Posts: 218
Joined: Fri Mar 02, 2012 3:40 pm

Re: Low wall blockers but allow projectiles?

Post by gambit37 »

Nope, the solution in that link doesn't work because the blocker item blocks the entire tile, not just a single edge.
User avatar
gambit37
Posts: 218
Joined: Fri Mar 02, 2012 3:40 pm

Re: Low wall blockers but allow projectiles?

Post by gambit37 »

Wow, it's a year since I originally asked this and I still don't know how to do it, lol!

A year on, does anyone know the right way to make a low wall that blocks party movement, but allows thrown items to go over the top?

I can block party movement by adding a door component, and weirdly this allow missiles to be thrown over the wall. But missiles will also fall through the wall if their trajectory is angling downwards. I added an item constraint box, but that makes no difference to thrown items.

This must be possible, surely? What am I missing?
Azel
Posts: 808
Joined: Thu Nov 06, 2014 10:40 pm

Re: Low wall blockers but allow projectiles?

Post by Azel »

Hell, just put a damn invisible teleporter in front of it that only applies to Items. You can probably increase the height of the teleporter so that it is floating at the halfway mark, thus only porting items in the air above the low wall.

Sloppy approach, but I bet it would work :o
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Low wall blockers but allow projectiles?

Post by petri »

Have you tried using the ProjectileCollider component? You can specify it's size in the definition. Set debugDraw to true to see the collider volume.
User avatar
gambit37
Posts: 218
Joined: Fri Mar 02, 2012 3:40 pm

Re: Low wall blockers but allow projectiles?

Post by gambit37 »

Ah thanks! I didn't realise ProjectileCollider could have its size set, I'd only seen it setup like this, which blocks the full wall space:

Code: Select all

		{
			class = "ProjectileCollider",
		}
However, if I setup the size I want, thrown objects still don't travel over the top of the item...?

Code: Select all

		{
			class = "ProjectileCollider",
			size = vec(3, 1.125, 0.5),
			offset = vec(0,0.55,0),
			debugDraw = true,			
		},	
User avatar
gambit37
Posts: 218
Joined: Fri Mar 02, 2012 3:40 pm

Re: Low wall blockers but allow projectiles?

Post by gambit37 »

Further experimenting gives very weird results. It seems the height (Y value of the vector) of the ProjectileCollider doesn't correspond with where the engine allows you to throw items... or there's some related conflict with the offset values. For example, in this screenshot, the collider is set at the height of the white line. If I'm standing right in front of the wall and throw an item by clicking in the space above the wall, it falls at my feet without travelling any distance:

Image

After experimenting, I've found that the collider needs to be a bit lower than expected. In this screengrab, the collider hright is the white line, while the item constraint box is the yellow one. Now my only problem is making it block the party. Turns out I can't add a door component as a party blocker because monsters can't "see" through it. The whole point of these low walls was to have a fight over them using ranged weapons, and for creatures with missile attacks to still hit you... ;-)

So how do I block the party, but still allow creatures to see over this wall? Basically I'm asking for something like an obstacle object that can be set on walls and given a defined size...

Image
Post Reply