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: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

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 amWhy 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: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

minmay wrote: Sat Jan 09, 2021 6:46 pmBy 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: 349
Joined: Sun Jan 20, 2013 6:28 pm

Re: Ask a simple question, get a simple answer

Post by kelly1111 »

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.
User avatar
ratman
Posts: 159
Joined: Fri Jan 10, 2020 1:13 am

Re: Ask a simple question, get a simple answer

Post by ratman »

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: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

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: 246
Joined: Mon Jun 17, 2013 10:42 pm
Location: Switzerland

Re: Ask a simple question, get a simple answer

Post by maneus »

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.
User avatar
ratman
Posts: 159
Joined: Fri Jan 10, 2020 1:13 am

Re: Ask a simple question, get a simple answer

Post by ratman »

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: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

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: 125
Joined: Mon Dec 21, 2020 5:36 pm

Re: Ask a simple question, get a simple answer

Post by Kirill »

Simple question: Looking for Crack of doom mod. Plz help.
User avatar
Lorial
Posts: 91
Joined: Sat Dec 29, 2018 12:27 pm

Re: Ask a simple question, get a simple answer

Post by Lorial »

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