Jump to content

[HELP] How to get the moving dx element position?


Turbe$Z

Recommended Posts

This is the code:

    local now = getTickCount() 
    local x,y = interpolateBetween(one, one1, 0, two, two1, 0, (now - start) / ((start + 2500) - start), "Linear") 
    local now2 = getTickCount() 
    local x2,y2 = interpolateBetween(asd, asd1, 0, fgh, fgh1, 0, (now2 - start2) / ((start2 +2500) - start2), "Linear") 
    if right == false then
    dxDrawRectangle(x, (sy_/2-20) * ym, 3* xm, 40 * ym,tocolor(255,255,255,255))
    else
    dxDrawRectangle(x2, (sy_/2-20) * ym, 3* xm, 40 * ym,tocolor(255,255,255,255))
    end
    --
    if x >= 1063 and x <= 1073 and right == false then
        test = true
    elseif x >= 1089 and x <= 1099 and right == false then
        test = true

    elseif x >= 1158 and x <= 1172 and right == false then
        test = true

    elseif x >= 1212 and x <= 1232 and right == false then
        test = true

    elseif x >= 1276 and x <= 1293 and right == false then
        test = true

    elseif x >= 1423 and x <= 1433 and right == false then
        test = true

    elseif x >= 1476 and x <= 1487 and right == false then
        test = true
    else 
        test = false
    end

i want change the test to true when the rectangle is in the granted position, but how can i get the momentary position of the dx rectangle?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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