little LUA help needed - bind hooks dynamically?

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
Mebaru
Posts: 19
Joined: Sun Oct 14, 2012 2:03 pm

little LUA help needed - bind hooks dynamically?

Post by Mebaru »

Hello,
I am newbie to LUA and I don't know if this possible but I hope it is.
The basic idea is to bind hooks for spawn monster dynamically. For example, I spawn a spider and hook his onMove - all within script entity. Currently, I have to use cloneObject{} in monsters.lua and I find it not very comfortable if I spawn plenty of different monsters with different hooks.

Hope I was clear to understand :)
User avatar
JKos
Posts: 464
Joined: Wed Sep 12, 2012 10:03 pm
Location: Finland
Contact:

Re: little LUA help needed - bind hooks dynamically?

Post by JKos »

I have made a framework for this viewtopic.php?f=14&t=3321

It could be bit much if you are beginner in lua, but so was I a month ago :)
If the documentation is not clear enough please give me a feedback in Log Framework thread.
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
Mebaru
Posts: 19
Joined: Sun Oct 14, 2012 2:03 pm

Re: little LUA help needed - bind hooks dynamically?

Post by Mebaru »

Oh, great job! Thanks, will look into it :geek:
Post Reply