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!
minmay
Posts: 2697
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay » Sat Jan 09, 2021 6:46 pm

That elevator model file is really weird (by necessity at the time), and unfortunately I don't have a good answer for what causes the filesize disparity.
However, I think using the maxHeight field on the Door class would work as an alternative way to do the door hack that doesn't require a wacky model file (see the definition of prison_door_metal).
maneus wrote:
Sat Jan 09, 2021 10:06 am
Why not make your own animation in Blender for your elevator?
In Grimrock 1 you can't arbitrarily animate objects, every animation has to be attached to a Lever or Button or Monster or Pit or PressurePlate or the like. When you just want to translate something along one axis, Door often gives you better control.

By the way, I'm currently porting the importer/exporter to Blender 2.9x, and have everything done except for fixing one puzzling bug with the game_matrix feature that first started appearing in Blender 2.74. So you might want to hold off on installing ancient versions of Blender and just wait a couple days for me to fix that.
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
Isaac
Posts: 2996
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac » Sat Jan 09, 2021 8:05 pm

minmay wrote:
Sat Jan 09, 2021 6:46 pm
By the way, I'm currently porting the importer/exporter to Blender 2.9x, and have everything done except for fixing one puzzling bug with the game_matrix feature that first started appearing in Blender 2.74. So you might want to hold off on installing ancient versions of Blender and just wait a couple days for me to fix that.
That is a very welcome and worthwhile project. 8-) 8-) 8-)

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

Re: Ask a simple question, get a simple answer

Post by kelly1111 » Sat Jan 09, 2021 11:54 pm

Great to hear minmay. Currently using an ancient version indeed. 2.71 , will be glad to port over to 2.9 and learn the ropes there. Will have a look at the door maxheight.

ratman
Posts: 139
Joined: Fri Jan 10, 2020 1:13 am

Re: Ask a simple question, get a simple answer

Post by ratman » Tue Jan 12, 2021 3:13 am

Is there some sort of 'wait' function in Grimrock scripting so I don't have to use a bunch of timers and get confused? Example:

Code: Select all

function test()
print ("test")
wait 2
print ("test_2")
end

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

Re: Ask a simple question, get a simple answer

Post by minmay » Tue Jan 12, 2021 3:51 am

If this is in a script_entity, you can use delayedCall.

Code: Select all

function test()
	print("test")
	delayedCall(self.go.id, 2, "test2")
end

function test2()
	print("test_2")
end
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
maneus
Posts: 235
Joined: Mon Jun 17, 2013 10:42 pm
Location: Switzerland

Re: Ask a simple question, get a simple answer

Post by maneus » Tue Jan 12, 2021 7:13 pm

minmay wrote:
Sat Jan 09, 2021 6:46 pm
By the way, I'm currently porting the importer/exporter to Blender 2.9x, and have everything done except for fixing one puzzling bug with the game_matrix feature that first started appearing in Blender 2.74. So you might want to hold off on installing ancient versions of Blender and just wait a couple days for me to fix that.
That are great news minmay. Thank you for your effort.

ratman
Posts: 139
Joined: Fri Jan 10, 2020 1:13 am

Re: Ask a simple question, get a simple answer

Post by ratman » Sat Jan 16, 2021 5:59 pm

Is it at all possible to somehow get monsters to attack each other? In a puzzle I am working on the player uses buttons to control a monster (move, attack, turn) and use it to fight other monsters. (it will be an uggardian or something so that it uses ranged attacks.) The problem is that the other monster doesn't attack my monster.

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

Re: Ask a simple question, get a simple answer

Post by minmay » Sat Jan 16, 2021 6:11 pm

Yes, you can use a custom BrainComponent.onThink hook to make the other monster act however you want.
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.

Kirill
Posts: 82
Joined: Mon Dec 21, 2020 5:36 pm

Re: Ask a simple question, get a simple answer

Post by Kirill » Mon Jan 18, 2021 10:58 pm

Simple question: Looking for Crack of doom mod. Plz help.

User avatar
Lorial
Posts: 79
Joined: Sat Dec 29, 2018 12:27 pm

Re: Ask a simple question, get a simple answer

Post by Lorial » Sun Jan 24, 2021 7:20 am

The object "forest_ruins_secret_door" from the base game seems unable to save its current state when loading or leaving the respective level which has a dangerous trapping potential. Don't think adding a timer to periodically reopen these is the way to go.

Therefor I defined the object manually for my mod, however, it did not seem to have the minimalSaveState parameter which I was expecting. This bit caused impassable gateways and unreachable items in custom alcoves before. Also, is there a difference between leaving the line out and using "false" to define it?

Will this fix the issue for good or am I looking in the wrong direction?!

Post Reply