Aslain 398 Posted June 22, 2017 (edited) I'd like to change a position (and sometimes size, width and, hight too) on many elements like text fields or hp bar, in all markers*.xc files globaly. The change should be dependent on what is set in my custom file. In example when I select setup1 I will get everything positioned like I defined at setup1, and when I select setup2 it will display all elements like I selected in setup2. So basicaly I need to create some kind of easy way to switch that positions and sizes. Let's use this as example: "tankHp": { "name": "Tank HP", "enabled": true, "x": 0, "y": -16, "alpha": 100, "textFormat": { "font": "$FieldFont", "size": 11, "color": "0xFCFCFC", "align": "center", "bold": true, "italic": false }, "shadow": { "enabled": true, "distance": 0, "angle": 45, "color": "0x000000", "alpha": 100, "blur": 4, "strength": 2 }, "format": "{{hp}}" }, It has : "x": 0, "y": -16, let's call it setup1 Now I have this, it's for setup2 "x": 10,"y": -20, I need to make a switch for it somewhere in a file, preferably in custom file. I belive it should be changed to something like : "x": if setup2 then 10, else 0 "y": if setup2 then -20, else -16 Coud someone give me some hints on that? I would need to see some working examples for that. Edited June 22, 2017 by Aslain Quote Share this post Link to post Short link Share on other sites
konrad509 445 #395845 Posted June 22, 2017 (edited) I have some idea, but I'll post it when I'll be back from work. Ok, I'm back. Here's what I came up with. Create a file setups.xc with the following content { "setups":{ "setup": "setup1", "setup1":{ "x": 0, "y": -16 }, "setup2":{ "x": 10, "y": -2 } } } Put a reference to this file into @xvm.xc "setups": ${"setups.xc":"setups"}, Change the values of x and y to "x": "{{.setups.{{.setups.setup}}.x}}", "y": "{{.setups.{{.setups.setup}}.y}}", Edited June 22, 2017 by konrad509 1 Quote Share this post Link to post Short link Share on other sites