[Behavior] LiteTween

  • I actually came back to erase the post, because I figured it out.

    I'll leave it now to help others.

    I also didn't know about str() until now.

    I changed an option in 'Start' Parameters and it started working.

    I didn't see the str(variable) part.

    I had:

    MyTargetX

    I changed a Parameter and it started working.

    I tried Str(MyTargetX) with both Parameters and it was working.

    Thanks for your time, helpful as always.

  • When I'm using the angle tween, how can I choose if the movement is clockwise or counter-clockwise?

  • Zathan just use the minus ( - ) before your angle number for a counter clockwise.

  • Zathan just use the minus ( - ) before your angle number for a counter clockwise.

    Thank you for the answer!

    Unfortunately, I think it's not that simple <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">

    Please, take a look in this capx: https://1drv.ms/u/s!Ai2wcz1Xix0ygbwxXankv4EdwEhpsg

    Seem like, randomly, the angles mix themselves when the square jumps. When it do walljumps too.. I've tried various combinations in the tween values.

  • Zathan check your logic and tween settings. Negative values do work!

  • Zathan

    Have you tried to make it a 1 to 1 relation like this ?

    https://www.dropbox.com/s/l4ymw0h7f0g05 ... .capx?dl=0

  • Zathan

    Have you tried to make it a 1 to 1 relation like this ?

    https://www.dropbox.com/s/l4ymw0h7f0g05 ... .capx?dl=0

    Thank you for the example!

    But, why did you take the litetween away? My doubt is about the functionality of it. Folks say that if I put negative values it works, but I couldn't achieve this in the capx. What is wrong in my logic?

  • Zathan

    When I'm using the angle tween, how can I choose if the movement is clockwise or counter-clockwise?

    What I did was instead of 0 to 360.

    I used 0.001 and 359.999.

    What it is doing is going the shortest distance.

    By offsetting it just the tiniest bit solves it.

    It isn't limited to 360. I used 719.999 for 720 in order to get two spins.

    I could use -719.999 in order to make it spin the other way.

  • Hi!

    I am having a problem when using Bullet and LiteTween Behaviour at the same time:

    I have an object that moves at angle 90º when clicked (with the Bullet Behaviour) and, after a second, it stops. When the Bullet speed is equal to 0, a LiteTween starts and makes it move to a target. This works fine. But, when I click the object once again, instead of moving at angle 90º, it moves at angle 0º. I have already tried everything. I even tried changing the "angle of motion" property in the debugger from 0 to 90, but it doesn't allow me, it is blocked at 0. I can change all the other properties (vectors, gravity, etc), but not the angle of motion.

    Therefore, I think it is a bug, LiteTween somehow blocks the "angle of motion" property in the Bullet Behaviour. I can post a sample capx if you want.

  • Does anyone know if this plugin already uses Delta Time (dt)?

    I can't search dt in "Search this topic" because there is a 3 letter limit.

    I was only able to search Delta Time and only got 1 result.

    I didn't see it in the manual.

    EDIT********

    I tested it. It seems to already use dt or it remains accurate if it doesn't.

    I tested for 10 seconds.

    I added a 100,000 particle effect to slow my game down.

    I added dt to LiteTween and it finished in 31 seconds.

    The LiteTween where I didn't add dt finished in about 10 seconds.

    I am assuming by adding dt to LiteTween it removed it from that instance.

  • Unconnected

    Yes it does.

  • blackhornet

    I remembered how to test it after I posted.

    Thanks for the confirm.

  • Hi...

    i try to use this behavior, linier mode.

    when my sprite collision with another object, i pin that object and i want to that object will follow the sprite. but it can't.

    here is my file : dropbox.com/s/np0kqhwolmkis ... .capx?dl=0

    thanks anyway

  • Hey lunarray is there any chance you could make a value tween take a target value like position/scale? It would be slightly cleaner to use "start, target" for value tweens.

    It would be nice to have a note or an option in a future update. It was my first time using Value as a Tweened Property.

    Great Plug-in by the way. It is making things a lot easier.

    My project is a lot cleaner because of this plugin.

    I was able to remove a ton of events and was able to replace it with only 1 or 2 because of this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ChesVCF

    Sorry if I am late, but have you tried to change enforce to compromise? LiteTween DO override position, angle, etc if you set it to Enforce.

    Or if it still doesn't work, if you have the sample capx i can view it and look at it.

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