I've got an odd issue with a script I have written. It is designed to detect if the colour of the object you collide with matching the object the script is attached to. In the following screenshot you will see that in Colour Match script I output a Yes or No signal if the colour matches. In the code if I place log statements underneath the two emitSignal commands reporting if there is a match or not, that is output as expected with a match or no match. However, if I link these signals to another Script object which has a static log statement in, these are never output. I can't understand what is happening here. I thought perhaps emitSignal does not work from inside the Signal function, but I can see examples of this being done in the Draw example so it is supported. Any ideas? What is Buildbox support like? My experience so far isn't good.
@Steddyman I think you can't get in Logger's Signal Method. Because Logger script won't be initiated until Yes value sent. This can be caught only by existing running script.
Thanks for your response but I am sorry, I don't understand that. The Logger component is one I have written as you can see in the second screenshot. My understanding of Signal is it is fired when the linked node emits a signal using emitSignal. When that happens the Signal function on the target object is called. Is that not the case?
@Steddyman Sorry man. I am wrong. The issue you raised is valid. Just saw the scripting video. Even script node is not connected its instance is initiated.
Thanks Particles. I found the issue! It appears your custom script must have all three functions, an init, update and signal function, even if their definition is empty. I tried replacing my logger with an Add Point node and it worked. I then experimented with my code until I found the answer. Cool, I can carry on now.