lunarray's Forum Posts

  • TrickyWidget

    I'm not really sure how I should tackle this one. I could just put a check 'if this is a spritefont' then i'll tween the characterScale instead of tweening the instance size. However, this is not a very good solution, because then I should also tackle all other plugin type like text, etc.

    About adding three scale options for litetween, that would make it more complicated, I really don't want people sets up more and more option when they are doing tween. LiteTween was meant to be simple and essential, adding more and more settings and feature will really bloat this in no time. For now I think I would just leave it out for now and go revisit this later on.

  • sman118

    You can put all bouncies into a family, and make events for that, like the one on the apple example. That is if you just need to do bounce animation for sprites. I think several posts earlier i just post the apple's capx somewhere.

    But, If you really want to make it bouncy using elastic tween without multiple tween, you would need to write a custom tween function and implement it into litetween.

  • TrickyWidget

    Ok, this one should have fixed it, the scale tween vs mirror and flip.

    Could you explain the bug about 'Moving' with LiteTween undoing flip/mirror? The code on the position tween have nothing to do with Height or Width, so it shouldn't even affect anything about scale.

    PS: Download on the first page like usual

  • Added a little change for ppl who got frustated with always having to 'set target' when starting tween. Download on the first page.

    Explanation about the frustration:

    1. Say we have an apple sprite on coordinate (50,50) with Litetween behaviour and DragDrop on it.

    2. We set target to x: 100 relative and y: relative on the "On Layout Start" condition.

    3. When apple is mouse right-clicked, we set it to start the tween.

    What supposed to happen for MOST people:

    Apple dragged to 100, 100 using dragdrop

    Apple right clicked

    Apple moves to 200, 200

    What really happened:

    Apple dragged to 100, 100 using dragdrop

    Apple right clicked

    Apple teleports to 50,50 then moves to 150,150

    How to fix it in the old litetween:

    Do not set target x:100, y:100 in the start layout, force target recalculation on the On Right mouse click, just before starting tween.

    Some people complains to me about this. This is not a bug, but a rather poor design due to my inconclusiveness -.- (sorry).

    So, I added a little fix on the litetween, when you are starting tween, you can force recalculation using the new option, the default is the old litetween behaviour.

    PS: For people who are affected by this, I hope you guys can give me input about how I should tackle this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh, Size tween actually accepts two parameter which is width and height, you can or should use set target width and set target height for that...

  • There are two type of event in C2, you can try 'Add Event' in the c2 event editor and noticed there are ones with green little arrow in the bottom left corner. These ones with green little arrow are of trigger once type, it will only be executed once if it happens (of course it will be executed again if it happens again in the future, but only once per occassion).

    As for On collision, it is of the trigger once type, it will only be executed once, that is why you can't add trigger once while true with it.

    PS: The on overlap is the continuous trigger equivalent for on collision

  • suntemple

    Ah that one? actually the s and p variable and all can be changed to skew the curve of the elastic behaviour, i'm just making it to 1.70158 to match the default just like the penner's equation (same also with bounce and back). If I removed it all together, I wouldn't be able to use the s and p variable later on if I decided to expose those parameter one day. If you want you could look at the original penner's equation and you'd see that I didn't make any significant change on the original source.

    I can just make it to what you've written to make it much more optimized, but it doesn't make it run any faster during runtime. I used lookup tables, so that calculation would only needed to be done once (precalculation) and it wouldn't ever need to be calculated anymore.

    TL;DR: I'm not trying to make it hard to read or anything about those code sections, I just copied it from the original source . If I changed it to your version, it definitely would run faster, but I am thinking of exposing those variables one day.

  • Wenaptic

    Probably yes. I haven't tried it myself, though I think there won't be problem with it.

    PKrawczynski

    That is an interesting problem which I also have encountered along when making UI tweens, can you wait for awhile about it? I need to think over whether or not that feature should be implemented in LiteTween because i don't want it to become bloated. Maybe a storyboard/tweengroup/timeline plugin to control multiple LiteTween? Or should I stay with implementing it in LiteTween, that's a tough decision :3

  • tgeorgemihai

    I'm not sure if I can debug that with just a picture, I probably need a simple capx with that problem to be able to help. However, I tried to make a similar thing using tween position.

    https://dl.dropboxusercontent.com/u/553 ... erHit.capx

    As for your code, I think you forgot to "Set Value" before tweening value. FYI, Set Value set the initial value for value tween while "Set Target" set the target value. If you didn't do that, the initial value will be either zero or the value from the last tween.

    Also, I think you shouldn't use angle+180 to push player, it will produce strange result if the enemy hit a player from behind or when facing left/right. It will only produce correct result if the player is hit from the front.

  • I forgot to upload the files -.- sorry, it should work now...

  • PKrawczynski

    Okay, I've added playmode flip flop and scale tween. Last time I tried, it works well even with compromise mode.

    FYI, relative target does not really make too much sense here so both relative and absolute works exactly the same on scale tween.

    As usual, the download is at the first page.

  • Okay, scale is on my to do list now . There are also some other features i'm thinking of adding, but i don't want to put on too many features.

  • jayderyu

    I think putting that feature on the main litetween is not really a good idea <img src="{SMILIES_PATH}/icon_e_surprised.gif" alt=":o" title="Surprised">, so i forked it instead and make a simple capx here. Not sure if this is what you wanted.

    Oh, and can you tell me why you need 24fps update? I'm just curious as why it is not desirable to play with as much fps as you can.

    https://www.dropbox.com/s/enktbw4cm6ewo ... ps_cap.zip

  • JackAttackNZ

    Group tween was there in the old EaseTween behavior, if you're okay with the state it is currently is, I suggest you take a look on it (the link to download is in the first page). You can just name the group on the tween behavior and use group start to play all tween at the same time. I haven't checked the capx yet since i haven't downloaded 166, will take a look after this. :>

    edit: Forget what i said above :<. if you need objects to keep distance against a central axis, I don't think it is a good use case for litetween/easetween. Compromise mode might help, but i'm not so sure. I think it is better to ask in the How Do I forum as suggested.