How to control Static detail model from LUA
Hi,
Id like to start/ stop animation, set frame number, set Animation sequence,... in a model with Lua comands. Are there any to control a Static detail model?
Thanks
Id like to start/ stop animation, set frame number, set Animation sequence,... in a model with Lua comands. Are there any to control a Static detail model?
Thanks
Re: How to control Static detail model from LUA
Hi bigjj13,
which model you will change within the lua config?
the Model of the Avatar or the models of boxes or Creatures?
MfG
volto
which model you will change within the lua config?
the Model of the Avatar or the models of boxes or Creatures?
MfG
volto
Re: How to control Static detail model from LUA
Hi,
I'd like to controle this one: It is in my map and I'd like to controle it with my map Lua file.
MfG
I'd like to controle this one: It is in my map and I'd like to controle it with my map Lua file.
MfG
Re: How to control Static detail model from LUA
Yes the Object models can controlled used via lua, but with the information i have collected till this day. You must make a Sequence for each Event like the Motion from the Avatar and then the Events can played from a trigger. This is Information based on the Forum threads, how too use it is current Carsten the better source of information.
MfG
volto
MfG
volto
Re: How to control Static detail model from LUA
Hi BigJJ,
I'll look into it, but possibly cannot finish it today.
Can you please file a ticket for this issue?
You're right, that feature should be there but is still missing.bigjj13 wrote:Id like to start/ stop animation, set frame number, set Animation sequence,... in a model with Lua comands. Are there any to control a Static detail model?
I'll look into it, but possibly cannot finish it today.
Can you please file a ticket for this issue?
Best regards,
Carsten
Carsten
Re: How to control Static detail model from LUA
Ok, I'm happy to report that I just implemented this.
Changes are in r252 and r253.
I've also added a tiny example map script that demonstrates the use of three of the six script methods in map Kidney, using two newly inserted models, see Kidney.lua for just the script.
Please let me know if you need help using the new script methods -- I just realized (with some horror) that we have no map scripting documentation at all, and when implementing the above changes, that the C++ code for the game system needs a good overhaul (e.g. we can get rid of awkward
Alas, does the new code help you?
Changes are in r252 and r253.
I've also added a tiny example map script that demonstrates the use of three of the six script methods in map Kidney, using two newly inserted models, see Kidney.lua for just the script.
Please let me know if you need help using the new script methods -- I just realized (with some horror) that we have no map scripting documentation at all, and when implementing the above changes, that the C++ code for the game system needs a good overhaul (e.g. we can get rid of awkward
struct EntityStateT
, but the required changes are highly nontrivial). I've also created tickets (#67 and #68) for both points, but unfortunately hardly the time to implement them right now.Alas, does the new code help you?
Best regards,
Carsten
Carsten
Re: How to control Static detail model from LUA
Thanks a lot, this works greate!!Carsten wrote:Alas, does the new code help you?
I have some ideas for some new lua funktions:
GetFrameNumber() : Get the number of the current frame
SetFrameNumber(Framenumber) : Go to frame x
PlayFromTo(FirstFrame, Lastframe) : Play animation from frame a to frame b and than stop the animaton
Somthing like that would be greate!
Thanks
Re: How to control Static detail model from LUA
Well, yes, I see. The general problem is that the state of an entity must be sync'ed over the network, and/or it must carefully be considered what portion of the state is sync'ed and what portion isn't.bigjj13 wrote:I have some ideas for some new lua funktions:
GetFrameNumber() : Get the number of the current frame
SetFrameNumber(Framenumber) : Go to frame x
PlayFromTo(FirstFrame, Lastframe) : Play animation from frame a to frame b and than stop the animaton
Somthing like that would be greate!
If the current scripting API is sufficient to solve your problem at hand, then I'd prefer to defer the implementation of these additional methods until ticket #68 is at least partially implemented.
(If however there is a problem that cannot be solved with the existing methods, please let me know, so that we can take action sooner.)
Best regards,
Carsten
Carsten
Who is online
Users browsing this forum: No registered users and 4 guests