Jump to content
Korean Random

Use Calculations on hitlog position


Recommended Posts

I used some calculations to position some elements.

    "elements": [{
      "leftPanel": { "_y": 5 },
      "rightPanel": { "_y": 5 },
      "debugPanel": { "_x": "leftPanel._x + 325", "_y": 10 },
      "battleTimer": { "_x": "rightPanel._x - 150", "_y": 4 }
    }],

I have tried to do this on the Hitlog as:

    "y": "rightPanel._y + 150"
or
    "y": "HEIGHT - 10"

But nothing seems to work

The only thing that works is

    "y": 740

The idea is to make my xvm "compatible" with multiple screen resolutions, so people dont have to edit it to match their resolution.

 

Is this kind of calculation possible on hitlog? and if it is... what am i doing wrong?

Edited by ucramos
Link to comment
Short link
Share on other sites

I use xvm-stats and if i define a X or Y as -50 for example, it disappears from the screen. It goes to -50 instead of going to maximum X or Y - 50

 

Using this should return a position of 1870x1150 on a 1920x1200 resolution.

Link to comment
Short link
Share on other sites

I used some calculations to position some elements.

I have tried to do this on the Hitlog as:

    "y": "rightPanel._y + 150"
or
    "y": "HEIGHT - 10"

But nothing seems to work

The only thing that works is

    "y": 740

try to use @delay command:

{

  "@delay": 100,

  "hitlog": { "_y" : "rightPanel._y + 150" }

}

smth like this

if @delay will not work, you can also try to use "@interval"

Edited by sirmax
Link to comment
Short link
Share on other sites

Im sorry .... i have the log "upsidedown"

The header is on the bottom and the new lines are added to the top of the header.

 

So i had to put

    "y": -270,

because i have

    "h": 270,

Is the top of the square that counts and not the header... sorry for my noob mistake :)

 

And thank you all for the help

Link to comment
Short link
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...