nmdelrio Posted April 24, 2016 Share Posted April 24, 2016 I want an image to appear as the battle starts. But I want it to disappear after I make a kill. I have the following code in battleLabelsTemplates.xc but the image does not appear at start of battle at all. "toggleJtext": { "enabled": true, "updateEvent": "ON_VEHICLE_DESTROYED", "hotKeyCode": null, "onHold": false, "x": 230, "y": 0, "width": 330, "height": 54, "alpha": 100, "rotation": "", "scaleX": "", "scaleY": "", "autoSize": "center", "align": "left", "valign": "bottom", "antiAliasType": "advanced", "bgColor": null, "borderColor": null, "shadow": {}, "currentFieldDefaultStyle": {}, "format": "{{my-frags=0?<img src='cfg://default/m2k/toggleJtext.png' width='330' height='54'>|}}" }, Without the {{my-frags}}, the image appears, but will of course does not disappear after I make a kill. "format": "<img src='cfg://default/m2k/toggleJtext.png' width='330' height='54'>" This is my battleLabels.xc { "labels": { // Referenced labels. Note, that every custom field can be separate enabled or disabled by "enabled" switch in their settings "formats": [ ${ "battleLabelsTemplates.xc":"def.winChance" }, ${ "battleLabelsTemplates.xc":"def.toggleJtext" } ] }} What am I do wrong with {{my-frags}}? Any help will be appreciated. @ Quote Link to comment Short link Share on other sites More sharing options...
konrad509 Posted April 24, 2016 Share Posted April 24, 2016 {{my-frags}} returns no value when frag count is 0. Do it this way "format": "{{my-frags?|<img src='cfg://default/m2k/toggleJtext.png' width='330' height='54'>}}" 2 @ Quote Link to comment Short link Share on other sites More sharing options...
nmdelrio Posted April 24, 2016 Author Share Posted April 24, 2016 {{my-frags}} returns no value when frag count is 0. Do it this way "format": "{{my-frags?|<img src='cfg://default/m2k/toggleJtext.png' width='330' height='54'>}}" It works! You are a very clever and generous person, thank you! Been whacking myself on the head for the past 24 hours for this problem. 1 @ Quote Link to comment Short link Share on other sites More sharing options...
konrad509 Posted April 24, 2016 Share Posted April 24, 2016 No problem ;) But I'm curious what I should compare this macro to, to make it work the way you tried at first. I tried '', null, 'null' and few others but none worked either. I wonder if it's possible at all. @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.