No problem. I too am only now pushing a bit harder to apply my programming skills more properly under the Grimrock framework. Things don't always play nice with my .Net developer experience lol.
Personally, I'm not a fan of LUA at all. It reminds me of Jquery/Ajax, and how these scripting languages "enable" the abuse that web developers put on the presentation layer of software development. I find a lot of contradictions in how LUA functions, and even in how it is explained.
Example:
http://www.lua.org/pil/p1.html
The beginning of the LUA Preface:
Currently, many programming languages are concerned with how to help you write programs with hundreds of thousands of lines. For that, they offer you packages, namespaces, complex type systems, a myriad of constructions, and thousands of documentation pages to be studied.
... and then at the end of the Preface:
A great part of the power of Lua comes from its libraries. This is not by chance. One of the main strengths of Lua is its extensibility through new types and functions.
They start by chastising other programming languages for hiding large amounts of code behind libraries and type systems... and then follows up by bragging about how LUA uses libraries and type systems, which hide large amounts of code
Even the Grimrock scripting reference has contradictions that only diminish after "reading between the lines" (eg, "CrystalComponent:setCooldown(number) leads us to a successful, my_crystal.crystal:setCooldown(60)" ... whereas "MonsterAttackComponent:getAttackPower() leads to a failure if you try, my_monster.monsterattack:getAttackPower()"). Granted, once you find out what went wrong you realize it was your fault for not understanding the Scripting Reference better, but at the end of the day it still feels quite sloppy, imo.
But I digress...
In the Spawn code I wrote in this thread, it does hardcode X, Y, Elevation, and Facing numbers. I believe the best practice is to instead put a "dummy object" in the location that you want to spawn the monster at, and reference its coordinates instead. But I'm too lazy to do that lol
Oh and no offense to anyone who loves LUA. This is just my personal take as a non-scripter. I recognize the talent of plenty of talented LUA dev's in this community
