[behavior] Tween to Effect

0 favourites
From the Asset Store
Calculate parabolic trajectories and tween objects over them.
  • Tween2Effect

    (Updated: 2014/01/29)

    Passing tween value into (this sprite/current layer/current layout) effect to control the result of effect.

    demo capx

    Usage:

    1. add tween behavior , user could use lite tween or tween (the older version of tween behavior). Then add tween2effect behavior under tween behavior.

    2. configure tween behavior, user need to set tweened properties to "Value".

    3. configure properties of tween2effect.

    Name: the name of controlled effect

    Index: the parameter index of controlled effect

    In the demo capx, Index to 3 will pass the tween value into "R Replace" parameter.

    Target: set to "Instance" to control this sprite.

    Now user could control the effect by setting the tween behavior without adding any event.

    Each tween2effect will need to add one tween behavior above that. In the demo capx, user need to add 3 pairs of tween and tween2effect

    - tween
    [ul]
    	[li]tween2effect[/li]
    	[li]tween[/li]
    	[li]tween2effect[/li]
    	[li]tween[/li]
    	[li]tween2effect[/code:1jci08yr][/li]
    [/ul]to control the "R Replace", "G Replace", "B Replace" at the same time.
    
    Set the property "Target" to "Layer" could control the parameter of the effect at current layer, since the behavior will be put in a sprite (or a rex_layer object) and this sprite will be put in a layer.
    Set the property "Target" to "Layout" could control the parameter of the effect at current layout.
    Make sure that the effect had been added in the target (layer, layout, or sprite).rexrainbow2014-01-29 04:07:46
  • Thanks rexrainbow, I was looking for an effect tween.

    But I have a problem ! I use LiteTween, and if I put "Active on Start" to "No", I can't start the tween with an event, nothing happend. Is it only me ?

  • Joskin

    I'm not sure, you might ask it at LiteTween thread.

  • Update:

    Fix code following with LiteTween modified.

  • rexrainbow you should check out my Door Behavior topic, I need to make doors for my game. <img src="smileys/smiley4.gif" border="0" align="middle" />

  • GearGames

    Sorry, I had made other plugins first.

  • Try Construct 3

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

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

    I finally figured out how to do it :)

  • Update:

    Support passing tween value into parameter of layer/layout effect.

    Set the property "Target" to "Layer" could control the parameter of the effect at current layer, since the behavior will be put in a sprite (or a rex_layer object) and this sprite will be put in a layer.

    Set the property "Target" to "Layout" could control the parameter of the effect at current layout.

    Make sure that the effect had been added in the target (layer, layout, or sprite).

  • Ah, i need a video tutorial about these. English is not my native language and it's really hard to understand about what it is all about in this and how do I made it to work with my event. Actually i could not do anything useful with this or other downloaded "tween" plugins I found because i do not understand the documentation good enough. It's actually problem with all construct 2 documentation. I believe that if somebody would start video series about construct 2, he would be able to get very much views in YouTube, because these blog posts are little hard to follow.

  • sorbias

    Sorry for my pool english either.

  • rexrainbow

    I believe it's not about your english. It's just about that i'm not smart enough, or mathematically skilled to very fast understand these advanced features of C2. And it of course makes me want to see thing in practice so it would be easier to follow for person like me. Actually I'm very surprised in positive way that I can see here people like you who wanna create this kind of good tools for community to use. So thank you anyway.

  • - I can't seem to get tween2effect working. Even in your example file nothing happens. I've made sure that its running in webGL, Does it still work for you?

    thx

  • justifun

    Yes, I tested now and it worked correctly.

  • does anyone know where i can find this? the link is broken

    Thanks

  • chrisyamao

    rexrainbow has a link to all of his plugins in his sig.

    http://c2rexplugins.weebly.com/rex_tween2effect.html

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