I am attempting to get a controllable npc working by using the Avatar recording tutorial found in this pdf here.
As a test for later functionality, I wanted to use this entity client script found here, modifying it so that it uses the Messages api to send a trigger message to the Assignment Client script that controls the npc.
Eventually, the goal is to have these messages trigger different recorded animations, but for now I just want the AC script to print a success message to the console when it receives a message.
Here is the modified segment of code from the entity client script:
this.mousePressOnEntity = function()
//Send Message Messages.sendMessage("Channel", "Hello");
And here is the relevant code running on the assignment client:
Messages.messageReceived.connect(function(channel, message, sender, localOnly)
From my understanding, the “messageReceived” function in the messages API is supposed to trigger when a message is sent on a subscribed channel, but the assignment client isn’t printing to the sandbox log when I click the trigger entity.
Could anyone tell me what I’m doing wrong here?
Or, if I’m going about this the wrong way, could you point me in the right direction?