Ask a simple question, get a simple answer

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!
bongobeat
Posts: 968
Joined: Thu May 16, 2013 5:58 pm
Location: France

Re: Ask a simple question, get a simple answer

Post by bongobeat » Wed Feb 24, 2021 8:01 pm

I've already removed everything behind and on the side, turned the door by 180°, that does not change anything.
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505

bongobeat
Posts: 968
Joined: Thu May 16, 2013 5:58 pm
Location: France

Re: Ask a simple question, get a simple answer

Post by bongobeat » Wed Feb 24, 2021 8:10 pm

THOM wrote:
Wed Feb 24, 2021 5:14 pm
Good point, maneus.
I've in addition thought if anything with other custom objects may cause the problem. Maybe one has a door component or a ProjectileCollider. Maybe with an offset.

A good way would be to delete all objects one by one and see, if anything changes when doing it.
well, there is no projectile collider with offset on that spot, the nearest projectile collider is 3 square forward (will check again something else)

Also the tileset around is a custom tileset that act as invisible wall (like the dungeon wall tile, but without any wall/pillars), that shows rocky wall on the automap, it only puts a swamp heightmap floor.

I've tryed to put only swamp floor tile around, and move every object far away, but that doesn't change anything.
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505

minmay
Posts: 2700
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay » Wed Feb 24, 2021 8:15 pm

Try standing in the same place and throwing an item to the west. Does it stop immediately like the firearm attack?

edit: wait I have a better idea. Use this umod:

Code: Select all

local orig_raycast = FirearmAttackComponent.raycast
FirearmAttackComponent.raycast = function(self, pos, dir, range, ignoreEntity)
	local hitWhat, nearestEntity, hitPos = orig_raycast(self, pos, dir, range, ignoreEntity)
	gui:hudPrint(string.format("Firearm hit: %s", nearestEntity and nearestEntity.id or hitWhat))
	return hitWhat, nearestEntity, hitPos
end
It'll tell you what the firearm attack is hitting.
Last edited by minmay on Wed Feb 24, 2021 8:21 pm, edited 1 time in total.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.

User avatar
THOM
Posts: 1181
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Ask a simple question, get a simple answer

Post by THOM » Wed Feb 24, 2021 8:19 pm

Sometimes a script or an object can produce effects on a wrong level. e.g. when you reppell something on a certain square but forgot to query also for the right level. Maybe something like that is going on.
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download

bongobeat
Posts: 968
Joined: Thu May 16, 2013 5:58 pm
Location: France

Re: Ask a simple question, get a simple answer

Post by bongobeat » Wed Feb 24, 2021 10:33 pm

minmay wrote:
Wed Feb 24, 2021 8:15 pm
Try standing in the same place and throwing an item to the west. Does it stop immediately like the firearm attack?

edit: wait I have a better idea. Use this umod:

Code: Select all

local orig_raycast = FirearmAttackComponent.raycast
FirearmAttackComponent.raycast = function(self, pos, dir, range, ignoreEntity)
	local hitWhat, nearestEntity, hitPos = orig_raycast(self, pos, dir, range, ignoreEntity)
	gui:hudPrint(string.format("Firearm hit: %s", nearestEntity and nearestEntity.id or hitWhat))
	return hitWhat, nearestEntity, hitPos
end
It'll tell you what the firearm attack is hitting.
An item like a shuriken is not blocked and act normally.

I can't use the umod, I have not the game on steam, my game is from humble.
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505

Zo Kath Ra
Posts: 865
Joined: Sat Apr 21, 2012 9:57 am
Location: Germany

Re: Ask a simple question, get a simple answer

Post by Zo Kath Ra » Thu Feb 25, 2021 12:58 pm

bongobeat wrote:
Wed Feb 24, 2021 10:33 pm
I can't use the umod, I have not the game on steam, my game is from humble.
I bought LoG2 on HB and it included a Steam key.

User avatar
THOM
Posts: 1181
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Ask a simple question, get a simple answer

Post by THOM » Thu Feb 25, 2021 1:13 pm

I can't remember, where exactly I bought my game, but it included no key. I have one for LoG1, but not for 2.
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download

bongobeat
Posts: 968
Joined: Thu May 16, 2013 5:58 pm
Location: France

Re: Ask a simple question, get a simple answer

Post by bongobeat » Thu Feb 25, 2021 11:46 pm

lol, I thought that their was no trace on that purchase on humble, or no account created...

I finally found an old txt file, with a link on humble, where I got a steam key,
will try that later.
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505

bongobeat
Posts: 968
Joined: Thu May 16, 2013 5:58 pm
Location: France

Re: Ask a simple question, get a simple answer

Post by bongobeat » Fri Feb 26, 2021 10:46 pm

ok, done a quick test with the script:

the thing says it hit "beach_master_gate_7"
that's the door which is placed on coordinates 25,25 and I'm shooting from the coordinates 28,26

this is very weird :roll:
My asset pack: viewtopic.php?f=22&t=9320

Log1 mod : Toorum Manor: viewtopic.php?f=14&t=5505

kelly1111
Posts: 342
Joined: Sun Jan 20, 2013 6:28 pm

Re: Ask a simple question, get a simple answer

Post by kelly1111 » Wed Mar 10, 2021 12:50 pm

I have a question about spells/ projectiles.

There is a spawnOffsetY line in the script that moves the spell up and down, is there a way to move a spell projectile to the left or right? , I need a particle that travels close to the wall when fired from a spawner.

Post Reply