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!
Have we lost the onMove and onTurn hooks for monsters?
(They existed in LoG1, but I don't see them in LoG2.)
According to the script ref, only the party seems to have them.
**Or has the functionality been shifted over to the onThink hook?
If so... How does one implement an onMove-like feature without replacing the monster brain?
Isaac wrote:According to the script ref, only the party seems to have them.
I'm pretty sure MonsterMoveComponent and MonsterTurnComponent are MonsterActionComponents so they have onBeginAction hooks, onEndAction hooks, and onAnimationEvent hooks. AND you have a general onPerformAction hook in MonsterComponent, as well as the ability to do it in the brain obviously. MonsterMoveComponent and MonsterTurnComponent hooks are even used in the asset pack.
I have scaled small objects in Blender to obtain bigger objects, but it seems that if the object initially is height 3, scaling it in Blender don't transform it in the Editor?
Other silly question: is it possible to replace in game (by script) a tile brush by another? or to make a brush invisible until a specific call?
Duncan1246 wrote:I have scaled small objects in Blender to obtain bigger objects, but it seems that if the object initially is height 3, scaling it in Blender don't transform it in the Editor?
Did you apply the transformation before exporting?
Duncan1246 wrote:Other silly question: is it possible to replace in game (by script) a tile brush by another? or to make a brush invisible until a specific call?
No, I'm pretty sure the tile map, heightmap, noise map, and reflection map are all immutable once the dungeon starts. (And it would be pretty useless to be able to change the heightmap or noise map anyway since the heightmap geometry has already been built...)
Can you post the full error message with the stack trace? It's quite impossible to figure out what you did without even knowing where the call came from.
minmay wrote:Can you post the full error message with the stack trace? It's quite impossible to figure out what you did without even knowing where the call came from.
Don't I know it...
But it's one of those every once in a while... not at all sure what caused it... kind of errors. Last time it happened, I had let the editor run, and eventually it just quit. I'll have to screenshot it when it happens again. This next time I will keep an eye on its resource use to see if its memory footprint spikes.
Duncan1246 wrote:I have scaled small objects in Blender to obtain bigger objects, but it seems that if the object initially is height 3, scaling it in Blender don't transform it in the Editor?
Did you apply the transformation before exporting?
Duncan1246 wrote:Other silly question: is it possible to replace in game (by script) a tile brush by another? or to make a brush invisible until a specific call?
No, I'm pretty sure the tile map, heightmap, noise map, and reflection map are all immutable once the dungeon starts. (And it would be pretty useless to be able to change the heightmap or noise map anyway since the heightmap geometry has already been built...)
Yes, I have scaled object in Blender first, then export and create a new object in LG. It's works well for a little object (scope) but I fails to do the same for forest_oak,I don't know why.
I don't plan to change the heighmap, but I want to fill a zone initially ground-mapped with water using the trick of water-adjusted on a custom water surface. But it seems, like you say, that there is no way to do so.
Duncan1246 wrote:Yes, I have scaled object in Blender first, then export and create a new object in LG. It's works well for a little object (scope) but I fails to do the same for forest_oak,I don't know why.
Again, did you apply the transformation? Object -> Apply -> Scale.
The animation for forest_oak probably includes setting the object location, rotation, and scale. So if you make an object transformation it probably won't do anything. You need to apply it to the actual mesh. Of course this will also likely break the animation.