Page 4 of 5

Re: Hook framework (a.k.a LoG Framework 2)

Posted: Sat Jan 03, 2015 7:09 pm
by melierax
Hello
No need to dungeon I found my mistake :roll: , now it works
Bye :)

Re: Hook framework (a.k.a LoG Framework 2)

Posted: Thu Mar 19, 2015 2:44 pm
by Duncan1246
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:
SpoilerShow
function battlefielddig()

fw.script:set('floor_trigger@floortrigger.Vallee des Anciens.onActivate',function(hook,self)
print("ok")
end)
end
I tried with object Id, with FloorTrigger for component, etc... I am lost :cry:
Duncan

Re: Hook framework (a.k.a LoG Framework 2)

Posted: Thu Mar 19, 2015 9:44 pm
by JKos
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"
		}
	}
}

Re: Hook framework (a.k.a LoG Framework 2)

Posted: Fri Mar 20, 2015 1:47 am
by Duncan1246
JKos 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"
		}
	}
}
Thanks! I haven't understood this in reading your doc, but it is logical :mrgreen:

Re: Hook framework (a.k.a LoG Framework 2)

Posted: Fri Mar 20, 2015 12:15 pm
by Duncan1246
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:
SpoilerShow
Put this in init.lua:

Code: Select all

cloneObject{
       name="floor_fw_trigger",
       baseObject="floor_trigger",
                  components = {
                                        fw_addHooks{
                                        class="FloorTrigger"
                                            }
                                }
          }
(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
Script is called, but do nothing... Where am I wrong?

Re: Hook framework (a.k.a LoG Framework 2)

Posted: Fri Mar 27, 2015 4:03 pm
by Duncan1246
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:
SpoilerShow
Put this in init.lua:

Code: Select all

cloneObject{
       name="floor_fw_trigger",
       baseObject="floor_trigger",
                  components = {
                                        fw_addHooks{
                                        class="FloorTrigger"
                                            }
                                }
          }
(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@floorttrigger.Vallee des Anciens.onActivate',function(hook,self)
print("ok")
end)
end
Script is called, but do nothing... Where am I wrong?
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?
Duncan

Re: Hook framework (a.k.a LoG Framework 2)

Posted: Fri Mar 27, 2015 4:34 pm
by JKos
floorttrigger, there is an extra t.

Re: Hook framework (a.k.a LoG Framework 2)

Posted: Fri Mar 27, 2015 5:50 pm
by Duncan1246
JKos wrote:floorttrigger, there is an extra t.
God Damned! No! It's a bug in my post, in my mod I write it correctly "floortrigger". So my ask stays alive...
Duncan

Re: Hook framework (a.k.a LoG Framework 2)

Posted: Fri Mar 27, 2015 5:58 pm
by Dr.Disaster
Can we have the whole thing, please?

Re: Hook framework (a.k.a LoG Framework 2)

Posted: Fri Mar 27, 2015 6:53 pm
by JKos
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()