I'd like to create a lua function that calls multiple separate plugins with the same data. In this case it is to initialize a "robot" with the strings for the various joints and ik group. I need the message to go to my driver plugin and inverse kinematics plugin, for example. Is this possible?
Do I use the normal register functions supplied with the latest vrep perhaps and just call register for both plugins, or would I need a different approach because the multiple registrations would collide?
One lua function for multiple plugins
Re: One lua function for multiple plugins
Hello,
yes, this is possible. You need to:
yes, this is possible. You need to:
- in each plugin, register the same custom lua function. The last registration is the one that will be called-back. This means that only one plugin will be called back.
- in each plugin callback routine (actually you don't know at first which plugin will be called back) call simBroadcastMessage.
- each plugin will receive the broadcast message