Yeah, html comments are still sent to output, but you just don't see them. So, if the comment is in onTokenMove, then you should use the [H: ], but if not and it's a called UDF then you should set it to ignore output. I try to keep the onTokenMove hook as small as possible. By default, all my UDFs have ignore output set.
Code: Select all
@@ @onMultipleTokensMove
[H: ids = macro.args]
[H, if(am.play.doVBLMove(ids)), code: {
[H: tokens.denyMove = 1]
[H: am.play.VBLMove(ids)]
};{}]
!!
@@ @onTokenMove
[H: id = currentToken()]
[H, if(tokens.moveCount <= 1 && am.play.doVBLMove(id)), code: {
[H: tokens.denyMove = 1]
[H: am.play.VBLMove(id)]
};{}]
!!
@@ @doVBLMove
[H: ids = arg(0)]
[H: doVBLMove = 0]
[H: counter = 0]
<!-- ignore if vision is off for map -->
[H: mapVisionOn = if(json.get(getInfo("map"),"vision type") != "off",1,0)]
[H, if(json.type(ids) == "ARRAY"): ids = json.toList(ids)]
[H: numIds = listCount(ids)]
[H, while(! doVBLMove && counter < numIds && mapVisionOn), code: {
[H: id = listGet(ids,counter)]
[H: switchToken(id)]
[H: name = lower(getName())]
<!-- only need one valid token to use VBLMove macro -->
[H, if(! startsWith(name,"lib:") && ! startsWith(name,"image:")): doVBLMove = 1]
[H: counter = counter + 1]
}]
[H: macro.return = doVBLMove]
!!