D'Lanor wrote:It just so happens that I figured this out today. From a responder you can send a notify message to the Python file mod. You could call this an "undocumented feature".
Ough. It was mind buggling that where was no real tutorials for such scenario. I mean: making avatar do something, then do some animation, then emit sound, then do some game logic with python, all in one run: isn't this a tipical scenario of using pythonmod?
Anyway, as everything regarding URU moding it didn't work at first time. In fact it styll not working.
I was playing with this since yesterday (lots of testing of diffrent variations) and I think that:
- Code: Select all
- type: notifymsg
params:
receivers:
- pyfilemod:PythonModName
waiton: 1
Is not enough.
I got "waiton: 1", becouse I have couple of cmds in responder. I make avatar do animation, then after animation I play sound emiter, then I try to notify pymod, then I do avatar animation, and then again sound emieter. Everything after single player click.
My pymod script is thery simple now, no attribiutes are recived. Insted in methods I use:
- Code: Select all
PtSendKIMessage(kKILocalChatStatusMsg, "OnNotify")
To write loggin messages about launching methods.
I attached the same script to the separate testing button with simpleclick.
Everything seams to work, except notifying pymod from my main button.
P.S.
Should I use ptModifier class or ptResponder class, and what is difrence between them?
P.S.2
Is it possible to use DynamicBookTemplate with avatar animations? I mean that after someone clicks on linking panel in the book, I would like to lauch an animation of avatar touching the book and then link avatar out.