-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand UDP example scripts to include using UDP values in the script #34
Comments
I've sent you a demo that is using UDP Bool for an example of how they are used. Howard |
@HowardBaxton |
Ahh, OK you busted me. The demo I have does not include a script to check the UDPBOOL's state other than nPose scripts themselves. I did however do a little research and if needing to intercept one (or more) UDPBOOL states as they are updated in a script (which is when the NC line is read, it can be done something like this functional script:
|
I did not get the demo Howard. Maybe it was blocked by my email filter or something (wasn't in spam folder). Reading example above Intake it that snippet will listen in on the nPose messages and when a UDP gets updated, it will intercept it and then allow you to act on the updated value. I was actually just looking for a way to access the UDP value itself regardless of it's getting updated or not. Is there a linkmsg I can send (with the UDP string as the argument) to retrieve the UDP's value? I didn't see such a command in the list of known link messages, so I am thinking no? So, either it's missing from the list or there is no reason to send that info between scripts? |
I sent the demo to you in world. It should be in your inventory when you log in. There is no command to allow you to ask for the current value from any of the scripts so using something similar to the script above is the only way you could grab the most up-to-date value of the udp. For others who may read through this I'll explain what happens and how the data flow works.
The first line is a global option we can set to turn ON the facial expressions in nPose so that if facials are used, they will be run for any pose. So, we see these lines in the .init card but how does nPose process and use them? These values for the macro, the udpbool, and the facials option will remain exactly this way until we select another notecard from menu which changes these settings. Such as a menu notecard to turn off facials and change the macro and udpbool as follows:
When the menu button is clicked, the core will get the notecard information and the process described above takes place again. This is not the initial setup but would be considered an update to the values. The example script above would get the information at the same time as the menu script would. |
The two UDP sample scripts show how to create and update a UDP (I guess if it doesn't exist the update link message to nPose creates it?) But what they do not show is how to access the UDP values for use in the script.
Maybe create an example where the UDP value is fetched, and then used to fire of a SET card depending on its value?
The text was updated successfully, but these errors were encountered: