2 buttons to the same animation

Announcements and discussion regarding the Guild of Writers PyPRP

Re: 2 buttons to the same animation

Postby D'Lanor » Sun Feb 07, 2010 6:57 am

Yes, this is multiplayer compatible because it still uses the SDL state. I am glad it worked because I had never tried this myself. You could say that you were my guinea pig. :D

For those interested I will explain the technical details. I decided to make use of the info tag associated with every SDL state change. Both buttons still change the same SDL state but they now send along different info. This function btw was already implemented in xAgeSDLBoolToggle.
xAgeSDLBoolRespond which responds to the toggle however did nothing with that info (except print it in the log files). So it simply runs all responders connected to the SDL state.
The python file I made is a modified version of xAgeSDLBoolRespond which now uses the info tag to differentiate between the two buttons and runs only the appropriate responder.
Goethe on the Art: "It is in self-limitation that a master first shows himself."
D'Lanor

User avatar
 
Posts: 1627
Joined: Sat Sep 29, 2007 4:24 am

Re: 2 buttons to the same animation

Postby diafero » Sun Feb 07, 2010 10:35 am

And I always wondered what the point of that weird string embedded in the SDL was... the Relto door uses it, so Alcugs had to support it, but it all it does is keeping it as is and always sending it with the update (so it's saved in the permanent age state) ;-)
"Der Horizont vieler Menschen ist ein Kreis mit Radius Null - und das nennen sie ihren Standpunkt."
"Most people's horizon is a circle with a radius of zero. They call it their point of view."
diafero

 
Posts: 1388
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Previous

Return to PyPRP

Who is online

Users browsing this forum: No registered users and 1 guest