Support for Multiple Targets


#23

All a learning curve, Jason - sure you’ll get there with it. Know everyone here will help out however we can :).


#24

Thanks a lot James, really appreciate it. Seems like a nice community.


#25

So im still working on it. Im stuck at the root stage of this.

function myRepeatingFunction() {
var imageSeen1 = symbol.nodes.Track1.nodes.Script.getStatus();
var imageSeen2 = symbol.nodes.Track2.nodes.Script.getStatus();

}

Z.every(2000, myRepeatingFunction);

Any more help would be great.

Thanks all.
Jason


#26

1 - First, the sub symbols are not added to the hierarchy, but loaded dynamically.

var trackingImageDisplayed = Z.Symbol(« symbol_1_name »);
symbol.nodes.trackingImagesGroup.push(trackingImageDisplayed);

2 - Then call your repeating function to check if the loaded symbol is seen or not:

var trackingImageFound = trackingImageDisplayed.nodes.code.getStatus();
     if (trackingImageFound ) { ... }

3 - If not, then you unload the current symbol, by clearing its parent group:

symbol.nodes.trackingImages.clear();

4 - Now, you can load the next one… ( goto 1 :grin: )

The whole process is not complicated, but for sure it’s easier is you are comfortable in JS.
May be you should try first to dynamically load then unload a symbol.

Jean.


#27

Just posted my code for my Multi Tracking Image.

Enjoy!!
Steve


#28

Hey Steve this is great! Thank you! The page seems to not be loading correctly though. Having trouble downloading.


#29

Sorry fixed link.

http://rentanerdcomputers.com/wp-content/uploads/ZapWorks/Multi%20Tracking%20Image.zpp


#30

Thank you Steve for sharing! :grin::+1: