0 Favourites

[Behavior] LiteTween

  • Actually you can also control the order of things using events and actions, but it would be very annoying or complex.

    For triggers, there is an onTweenEnd event you can use to trigger when a tween has ended, or onTweenProgress to trigger when a tween has reached a certain percent of progress.

    As for actions, you can use "Set parameter" action, which sets all the parameter at once.

    There is also a group tween. So you can group several tween together and run it in paralel. Then you can treat this as one tween.

  • unfortunately I'm not able to run the capx file as I only have build 108 and it needs build 111 any help is appreciated, I suspect the free version does not get updates as fast as the paid version.

  • Ahhh I see, Just saw your 2nd reply. Well, I'll have another go using the example you have sent if it can somehow be saved to be opened by my version of construct that is.. else I'll try for the event sheet option again... for me the problem seems to be that the left hand panel is over writing the actions I am applying to the tweens.

    so it does some actions from the left hand panel and then some of the actions from the event sheet. Makes for very unpredictable results :s

  • R112 is not restricted to paying user I think,

    I think you can download it here

    scirra.com/construct2/releases/r112

  • thank you that's just installing now

  • Ok after viewing the example, how would I set that up so it repeats once the layout is loaded or if I wanted to cue 2 sprites up so that one goes up.. then another .. then the first one again to created a rolling backdrop so to speak would this be easier to do the way shown in that example or would I be better off trying to cue all of these actions with the event sheet?

  • You can do with both method, you need to consider your event count though if you are free user, since you are limited to a max of 100 events.

    Ok, back to the case, it could be done with a well timed repeat, which then you won't need any event. But you can also use event like 'onGroupTweenEnd' then play the other tween.

    As for which is better, the event-action method is definitely better (more flexible), since you can change parameter during runtime, which is definitely an advantage. For example, you can tie a parameter to a global variable. In most use case this is definitely the best solution.

    For simple case which does not need much flexibility, like title screen animation which does not need much flexibility during runtime, I prefer using non-event method, since it would save me from alot of events.

  • Ahh true, I had not considered the event limit at all till you mentioned it. I'll have to be mindful of this.. I do intend to purchase the pro version of the software however I am waiting for some basic features to be added like alignment and distribution of objects. Grouping objects together and proper grouped object scaling.

    thank you very much for all of your help, you are a very helpful user. I will give the implementation of this another shot now I have this extra help and knowledge to resolve issues and will let you know if I crash and burn haha. Hopefully this will not be the case :)

    One last question, and i'm not sure if you have clearly answered this but how do I stop the tween behaviours on the left panel overwriting or influencing objects instead of the event ones? If this is already answered just say I answered this already you dumbass and I'll look again I just didn't see it there when I look through.

  • I don't really understand the last question, but I'll try to answer that.

    1. EaseTween won't affect your object once it finished playing. So, once it stopped playing you don't have to worry about it anymore. Except if you are on Ping Pong/Repeat/Loop/etc playmode. If you're on Play Once mode, it will be fine.

    2. If there are two behaviour that influence the object, for example, Bullet and EaseTween active at the same time. Both will be taken into account and played simultaneously.

    3. If you don't want it to play at the start, we have "Active on Start" property on the left panel. You are free to play it anytime you need using event-action (for example when a button is clicked).

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • What I mean is that, I've set play on start turned off.

    In the left hand area where you can modify behaviour properties.. Target is set to 100, 100   however I want the object to target 100, 300.

    I set 100, 300 as the target using an event and then I set it to play.. however it does not function as expected.. it still prioritises to the default 100, 100 instead of the assigned 100, 300. I want to find a way to disable the default settings so that it will not do the default pre defined 100, 100 target.

    If this still doesn't make proper sense, or shouldn't be happening then I will assume I have previously done something wrong and once I re-set up what I am wanting to achieve, if it still is not function as expected, I am happy to upload the capx file as it may be a bug though I'm sure I just missed some setting before or had actions loading in the wrong order.

    I'll do my best and let you know the results

  • If you can upload the capx, it would be easier for me to help.

  • <img src="http://a4.ec-images.myspacecdn.com/images02/155/ffe18a04bedd48559d428ceddc463bb4/l.png" border="0" />

    Above is a screen shot of the problem area.

    With this code in place, the graphic is always invisible and it does not appear .. if I turn off the fade it simply pauses at one spot.. teleports to the top.. then back then up to the top again and then back etc..

    It should have started at the bottom, faded to full opacity. moved to middle.. waited.. moved to the top fading out again then teleported to the bottom and repeated over and over

    I would upload the capx but I don't have an account with any file sharing sites currently. and the file size including assets is a little on the large side.

    When I use relative mode, it completely disappears fade active or disabled.

  • After many attempts, it seems that the issue is as follows :

    I establish the tween duration so it does not teleport

    I then set the first target destination and then start the tween

    Object moves as expected to target area where it stops due to the Wait command I have set up.

    .. however, the object then teleports back to the start location and repeats this same animation indefinitely.

    It completely ignores the 2nd target that I assign for the object to tween towards after the wait period has finished.

    My initial thoughts are that the most likely reason for this would be that I need to some how define a group of tween targets so that the behaviour knows they are a sequence and are to all be included.. but I need it to follow the System Waits that I have put in place to keep the animation sequenced properly.

    I'm not sure how to do this and I can't use the Ease Tween Wait parameter as I need different start and end wait times.

  • Jax: I really can't help without the capx, It's hard to really understand the problem with just the definition of what happened :<

  • Ok, I'll upload the capx now.

    Link : temp-share.com/show/dPf3gjAbW

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
0 Favourites
[BEHAVIOR] Chipmunk Physics
673 82,464
nelostic's avatar
nelostic
Unread hot topic
564 105,179
rexrainbow's avatar
rexrainbow
Unread hot topic
0 Favourites
[Behavior] moveto
415 127,025
andreyin's avatar
andreyin