How do I set litetween 'Target Value' to a variable?

0 favourites
  • 5 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • I'm working with litetween for some specialized moving platforms. I want to set the Target Value to vertical and set the value to call from a variable but for some reason this seems to be impossible.

    When using initialize tween you can set the target value but it needs to be a string...

    Does anyone know how to do this?

    (I tried to add an image but it wouldn't recognize anything I tried. Everything returned errors)

  • There is another action - "LiteTween Set Target", it allows to use a numeric variable.

    You can also convert a number to string using str() expression.

  • When using 'set target' it won't let me choose vertical or horizontal.

    x, y, angle, opactiy, width(scale), height(scale) and value.

    Since I'm using vertical don't I need to all select vertical?

    Also I tried to convert to string in initialize and the results did not turn out the way I expected when they should've worked just fine.

    Does using initialize erase all the other values for the tween? Would I have to manually set them all again in code?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • "Vertical" means changing Y coordinate.

    So use "Set target" action, target:"Y", value: your variable

  • Okay, I'll try that and report back. Thank you.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)