Page 65 of 396
Re: Ask a simple question, get a simple answer
Posted: Tue May 12, 2015 6:58 pm
by Isaac
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?
Re: Ask a simple question, get a simple answer
Posted: Tue May 12, 2015 7:16 pm
by minmay
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.
Re: Ask a simple question, get a simple answer
Posted: Tue May 12, 2015 7:56 pm
by Isaac
Aha. This works. Thank you.
* I like that there is a begin and an end hook available.
Re: Ask a simple question, get a simple answer
Posted: Wed May 13, 2015 11:33 pm
by Duncan1246
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?
Re: Ask a simple question, get a simple answer
Posted: Thu May 14, 2015 1:29 am
by minmay
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...)
Re: Ask a simple question, get a simple answer
Posted: Thu May 14, 2015 5:40 am
by Isaac
Has anyone come across the "bad argument #1 to removeNode" error?
If so, what are some tips to ferreting out the cause?
*Although it certainly suggests relation to deleting of objects.
Re: Ask a simple question, get a simple answer
Posted: Thu May 14, 2015 6:29 am
by minmay
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.
Re: Ask a simple question, get a simple answer
Posted: Thu May 14, 2015 7:01 am
by Isaac
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.
Re: Ask a simple question, get a simple answer
Posted: Thu May 14, 2015 11:07 am
by Duncan1246
minmay wrote: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.
Re: Ask a simple question, get a simple answer
Posted: Thu May 14, 2015 5:50 pm
by minmay
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.