Korman and python - how to save an animation state?

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.

Korman and python - how to save an animation state?

Postby ametist » Sun Sep 13, 2020 9:15 am

I have now managed to get my age Tiam wired up pretty well with the use of pyhton nodes. I have the xStandardDoor.py working for my three sliding doors, the xAgeBoolShowHide.py shows and hides several clickables and objects which are triggered by the xAgeBoolSet.py. And an SDL file to save it all( even if it have 5 StateDesc Versions atm, I have to admit that there have been a some trial and error ;) ). I do suspect though, that my nodes aren't the most efficient or elegant ones, but they work :) .

But there is something I don't know how to handle, how do I save an animation state? I have a clickable that triggers an objects animation and have a node attached. The node does its work, animates an object and shows another object. That other object's visible state is saved after leaving and returning to the age, but the first objects animation state is not saved. Which I want it to be obviously. I was thinking maybe xAgeSDLBoolRespond could be used? I don't know what 'F-forward on VM notify' and 'F-forward on Init' means though? Do I need those?
This is my node tree:
Attachments
RgnTableSensor_node.jpg
RgnTableSensor_node.jpg (77.05 KiB) Viewed 339 times
User avatar
ametist
 
Posts: 354
Joined: Fri Dec 28, 2007 6:55 am

Re: Korman and python - how to save an animation state?

Postby Tsar Hoikas » Sun Sep 13, 2020 2:33 pm

ametist wrote:But there is something I don't know how to handle, how do I save an animation state? I have a clickable that triggers an objects animation and have a node attached. The node does its work, animates an object and shows another object. That other object's visible state is saved after leaving and returning to the age, but the first objects animation state is not saved. Which I want it to be obviously. I was thinking maybe xAgeSDLBoolRespond could be used? I don't know what 'F-forward on VM notify' and 'F-forward on Init' means though? Do I need those?
This is my node tree:


I'm sure I don't need to say, but, if the animation's state isn't saved when reentering the Age, then it won't be properly synchonrized for folks who enter the Age after someone presses the button.

xAgeSDLBoolRespond sounds perfect for this case. "F-Forward" is shorthand for "fast-forward". Any responder can be "fast-forwarded" in python itself. What that does is immediately set all the animations, sounds, etc. that the responder will trigger at their ending state. That's exactly what you generally want to have happen "on Init" - in other words, when linking in. Otherwise, you would, for example, link in and see doors all over the Age closing themselves. "on VM notify" is when a shard administrator changes the SDL value on the server. Usually you don't care about this for gameplay elements. One case where you would want this off is the bahro shout event in the Neighborhood. When the shard administrator, Cyan, DRC, or whoever decides the bahro rock book to the city should appear, they set the variable server side. Then, the bahro links into all Neighborhoods and places the rock book on the pedestal. I wouldn't worry too much about this, except in the case of my DEFAULTOPTION=VAULT variables.

I am waiting for my footprints to show up in Tiam... ;)
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2139
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: Korman and python - how to save an animation state?

Postby ametist » Mon Sep 14, 2020 10:18 am

Tsar Hoikas wrote:I'm sure I don't need to say, but, if the animation's state isn't saved when reentering the Age, then it won't be properly synchonrized for folks who enter the Age after someone presses the button.

xAgeSDLBoolRespond sounds perfect for this case. "F-Forward" is shorthand for "fast-forward". Any responder can be "fast-forwarded" in python itself. What that does is immediately set all the animations, sounds, etc. that the responder will trigger at their ending state. That's exactly what you generally want to have happen "on Init" - in other words, when linking in. Otherwise, you would, for example, link in and see doors all over the Age closing themselves. "on VM notify" is when a shard administrator changes the SDL value on the server. Usually you don't care about this for gameplay elements. One case where you would want this off is the bahro shout event in the Neighborhood. When the shard administrator, Cyan, DRC, or whoever decides the bahro rock book to the city should appear, they set the variable server side. Then, the bahro links into all Neighborhoods and places the rock book on the pedestal. I wouldn't worry too much about this, except in the case of my DEFAULTOPTION=VAULT variables.


Yeay! Works like a charm! I get so happy when things work at the first try, that doesn't happen every time :lol:. Thank you!



Tsar Hoikas wrote:I am waiting for my footprints to show up in Tiam... ;)
They are there now, you will see them in next release :)
User avatar
ametist
 
Posts: 354
Joined: Fri Dec 28, 2007 6:55 am


Return to Scripting

Who is online

Users browsing this forum: No registered users and 2 guests

cron