Hook framework (a.k.a LoG Framework 2)
Re: Hook framework (a.k.a LoG Framework 2)
Hello
No need to dungeon I found my mistake , now it works
Bye
No need to dungeon I found my mistake , now it works
Bye
- Duncan1246
- Posts: 404
- Joined: Mon Jan 19, 2015 7:42 pm
Re: Hook framework (a.k.a LoG Framework 2)
Hello JKos,
I have installed Hook Framework and my first attempt is a success with a party hook. Thanks for your work!
But... I tried another one with a floortrigger, and I don't understand where I am wrong, but nothing happened! Here is my test code:
I tried with object Id, with FloorTrigger for component, etc... I am lost
Duncan
I have installed Hook Framework and my first attempt is a success with a party hook. Thanks for your work!
But... I tried another one with a floortrigger, and I don't understand where I am wrong, but nothing happened! Here is my test code:
SpoilerShow
function battlefielddig()
fw.script:set('floor_trigger@floortrigger.Vallee des Anciens.onActivate',function(hook,self)
print("ok")
end)
end
fw.script:set('floor_trigger@floortrigger.Vallee des Anciens.onActivate',function(hook,self)
print("ok")
end)
end
Duncan
The Blue Monastery (LOG1)
download at:http://www.nexusmods.com/grimrock/mods/399/?
Finisterrae(LOG2)
download at:http://www.nexusmods.com/legendofgrimrock2/mods/61/?
download at:http://www.nexusmods.com/grimrock/mods/399/?
Finisterrae(LOG2)
download at:http://www.nexusmods.com/legendofgrimrock2/mods/61/?
Re: Hook framework (a.k.a LoG Framework 2)
You have to manually add framework hooks to floor_trigger game object like you did with party object. like this:
Code: Select all
defineObject{
name="floor_trigger",
baseObject="floor_trigger",
components = {
fw_addHooks{
class="FloorTrigger"
}
}
}
- 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
- cloneObject viewtopic.php?f=22&t=8450
- Duncan1246
- Posts: 404
- Joined: Mon Jan 19, 2015 7:42 pm
Re: Hook framework (a.k.a LoG Framework 2)
Thanks! I haven't understood this in reading your doc, but it is logicalJKos wrote:You have to manually add framework hooks to floor_trigger game object like you did with party object. like this:Code: Select all
defineObject{ name="floor_trigger", baseObject="floor_trigger", components = { fw_addHooks{ class="FloorTrigger" } } }
The Blue Monastery (LOG1)
download at:http://www.nexusmods.com/grimrock/mods/399/?
Finisterrae(LOG2)
download at:http://www.nexusmods.com/legendofgrimrock2/mods/61/?
download at:http://www.nexusmods.com/grimrock/mods/399/?
Finisterrae(LOG2)
download at:http://www.nexusmods.com/legendofgrimrock2/mods/61/?
- Duncan1246
- Posts: 404
- Joined: Mon Jan 19, 2015 7:42 pm
Re: Hook framework (a.k.a LoG Framework 2)
Hi JKos,
I tried your solution this morning (instead of solar eclipse, I have had a brain one, I think...): no result...
What I have done:
Script is called, but do nothing... Where am I wrong?
I tried your solution this morning (instead of solar eclipse, I have had a brain one, I think...): no result...
What I have done:
SpoilerShow
Put this in init.lua:
(I tried also with a replacment one by "defineObject", same result)
then I put a floor_fw_trigger with "digonly" and a connected script: function battlefielddig()
fw.script:set('floor_fw_trigger@FloorTrigger.Vallee des Anciens.onActivate',function(hook,self)
print("ok")
end)
end
Code: Select all
cloneObject{
name="floor_fw_trigger",
baseObject="floor_trigger",
components = {
fw_addHooks{
class="FloorTrigger"
}
}
}
then I put a floor_fw_trigger with "digonly" and a connected script: function battlefielddig()
fw.script:set('floor_fw_trigger@FloorTrigger.Vallee des Anciens.onActivate',function(hook,self)
print("ok")
end)
end
The Blue Monastery (LOG1)
download at:http://www.nexusmods.com/grimrock/mods/399/?
Finisterrae(LOG2)
download at:http://www.nexusmods.com/legendofgrimrock2/mods/61/?
download at:http://www.nexusmods.com/grimrock/mods/399/?
Finisterrae(LOG2)
download at:http://www.nexusmods.com/legendofgrimrock2/mods/61/?
- Duncan1246
- Posts: 404
- Joined: Mon Jan 19, 2015 7:42 pm
Re: Hook framework (a.k.a LoG Framework 2)
As I said in the post above, I have made now many tests without any success, and I don't understand why I can't figure out where is my error. I have no problem with party hooks as I said before, so I surely miss something important. Can you help me?Duncan1246 wrote:Hi JKos,
I tried your solution this morning (instead of solar eclipse, I have had a brain one, I think...): no result...
What I have done:Script is called, but do nothing... Where am I wrong?SpoilerShowPut this in init.lua:(I tried also with a replacment one by "defineObject", same result)Code: Select all
cloneObject{ name="floor_fw_trigger", baseObject="floor_trigger", components = { fw_addHooks{ class="FloorTrigger" } } }
then I put a floor_fw_trigger with "digonly" and a connected script: function battlefielddig()
fw.script:set('floor_fw_trigger@floorttrigger.Vallee des Anciens.onActivate',function(hook,self)
print("ok")
end)
end
Duncan
The Blue Monastery (LOG1)
download at:http://www.nexusmods.com/grimrock/mods/399/?
Finisterrae(LOG2)
download at:http://www.nexusmods.com/legendofgrimrock2/mods/61/?
download at:http://www.nexusmods.com/grimrock/mods/399/?
Finisterrae(LOG2)
download at:http://www.nexusmods.com/legendofgrimrock2/mods/61/?
Re: Hook framework (a.k.a LoG Framework 2)
floorttrigger, there is an extra t.
- 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
- cloneObject viewtopic.php?f=22&t=8450
- Duncan1246
- Posts: 404
- Joined: Mon Jan 19, 2015 7:42 pm
Re: Hook framework (a.k.a LoG Framework 2)
God Damned! No! It's a bug in my post, in my mod I write it correctly "floortrigger". So my ask stays alive...JKos wrote:floorttrigger, there is an extra t.
Duncan
The Blue Monastery (LOG1)
download at:http://www.nexusmods.com/grimrock/mods/399/?
Finisterrae(LOG2)
download at:http://www.nexusmods.com/legendofgrimrock2/mods/61/?
download at:http://www.nexusmods.com/grimrock/mods/399/?
Finisterrae(LOG2)
download at:http://www.nexusmods.com/legendofgrimrock2/mods/61/?
- Dr.Disaster
- Posts: 2876
- Joined: Wed Aug 15, 2012 11:48 am
Re: Hook framework (a.k.a LoG Framework 2)
Can we have the whole thing, please?
Re: Hook framework (a.k.a LoG Framework 2)
Well I actually tested your code and it works for me after removing the extra t. What do you mean by:
then I put a floor_fw_trigger with "digonly" and a connected script: function battlefielddig()
then I put a floor_fw_trigger with "digonly" and a connected script: function battlefielddig()
- 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
- cloneObject viewtopic.php?f=22&t=8450