Page 1 of 1
Magma Golem broken?
Posted: Wed Mar 25, 2015 10:40 pm
by Dewalrus
I have a single magma golem in a room with three elevations connected by ladders for the player and invisible teleporters for the monster. It all seems to work fine in the Editor, but when exported, after a short time the Golem causes an error that crashes to the desktop. The error message says something about a terrain damage component calling a nil value. Any idea if there is an easy solution? I do not think it's related to the teleporters, as I can see that the Golem uses them without problems, but I could be wrong. What I'm hoping is that maybe I could just turn off some of his components to prevent this from happening... would that work, if so, which components would you suggest I try?
Re: Magma Golem broken?
Posted: Wed Mar 25, 2015 10:46 pm
by minmay
Please post the actual error message and describe what happens right before it appears. The only TileDamager that should result from a magma golem is the one attached to wall_fire which results from the golem's rangedAttack and groundPound actions.
Re: Magma Golem broken?
Posted: Thu Mar 26, 2015 3:04 am
by Dewalrus
Here is the error message:
assets/scripts/monsters/magma_golem.lua:0: attempt to index field 'tiledamager' (a nil value)
Interestingly, the first couple of times the error occurred shortly after I initiated the fight. When I went back to try to replicate it so I could capture the error, the fight worked perfectly fine for a good long time. I was convinced it had been an isolated bug and was no longer a problem. But then it did finally recur.
The only thing I can say for sure about the circumstances that cause it is, yes, it definitely happens as the Magma Golem is preparing to attack. But this last time, it got off several rounds of both the AOE and the Ranged attack with no problems before the error finally hit.
Re: Magma Golem broken?
Posted: Thu Mar 26, 2015 3:38 am
by minmay
Did you change the definition of the "wall_fire" or "magma_meteor_blast" objects? The only direct attempt to index that field is line 177, from the meteorFall action's onAttack hook:
Code: Select all
self.go:spawn("wall_fire").tiledamager:disable()
Re: Magma Golem broken?
Posted: Fri Mar 27, 2015 12:07 am
by Halluinoid
I just got the same error with my magma golem >> assets/scripts/monsters/magma_golem.lua:0: attempt to index field 'tiledamager' (a nil value)
I have got a magma golem in a fight arena, around the edge a raised pavement 1 level up
As I went passed the golem on the raised pavement 1 level up, the golem seemed to try doing something very close to the wall, I don't know what but that error came up and GAME OVER
only happened once, very rare but seeing this thread reminded me it just happened to me!!
Re: Magma Golem broken?
Posted: Fri Mar 27, 2015 12:11 am
by Azel
Halluinoid wrote:I just got the same error with my magma golem >> assets/scripts/monsters/magma_golem.lua:0: attempt to index field 'tiledamager' (a nil value)
I have got a magma golem in a fight arena, around the edge a raised pavement 1 level up
As I went passed the golem on the raised pavement 1 level up, the golem seemed to try doing something very close to the wall, I don't know what but that error came up and GAME OVER
only happened once, very rare but seeing this thread reminded me it just happened to me!!
That's the case with Dewalrus map as well. I took a look at it, and the Golem is using his Fire Wall attack in areas where the Elevation changes. The end result is the tile damager function is executing in "mid air." I assume this is why in the Main Campaign of Grimrock they only use the Golem in a big flat open area.
Re: Magma Golem broken?
Posted: Sun May 17, 2015 11:59 am
by Granamir
I had same problem with golem.
As far as i understood that error occurs when golem try to make ground attack (for me just the near attack not the one caused by long range meteor) where there is no free ground at that elevation. So if somehow it ends mid air or on a tile with higher elevation than attack it causes this error. Keep in mind that sometimes golem seems to see you even trough walls; example, using keypad as reference: if i have wall on 1 and 5 key position, and i'm in position 2 and golem in position 4, sometimes he can see u trough edge and try attack that inevitably ends up on tile 1 and/or 5 and it causes error. Something similar happens if u'r at elevation +1 than golem and u'r near it, sometime he seems to see u and try the attack, again error occurs.
Solved this problem building a map that prevents golem coming too close if i'm not at his same elevation and where i can see him freely...didn't tryed to disable his ground attack.