[behavior] Tween to Effect

Post your completed addons to share with the community

Post » Wed Jan 15, 2014 3:05 pm

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
[code]- tween
- tween2effect
- tween
- tween2effect
- tween
- tween2effect[/code]
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
B
108
S
26
G
260
Posts: 4,435
Reputation: 146,195

Post » Tue Jan 21, 2014 8:44 am

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 ?

Joskin2014-01-21 08:50:05
B
39
S
15
G
5
Posts: 295
Reputation: 6,089

Post » Tue Jan 21, 2014 8:58 am

@Joskin

I'm not sure, you might ask it at LiteTween thread.
B
108
S
26
G
260
Posts: 4,435
Reputation: 146,195

Post » Fri Jan 24, 2014 2:26 am

Update:

Fix code following with LiteTween modified.
B
108
S
26
G
260
Posts: 4,435
Reputation: 146,195

Post » Fri Jan 24, 2014 5:39 pm

@rexrainbow you should check out my Door Behavior topic, I need to make doors for my game. GearGames2014-01-24 17:40:21
B
28
S
5
G
5
Posts: 30
Reputation: 5,841

Post » Sun Jan 26, 2014 8:47 am

@GearGames

Sorry, I had made other plugins first.
B
108
S
26
G
260
Posts: 4,435
Reputation: 146,195

Post » Sun Jan 26, 2014 1:58 pm

@rexrainbow

I finally figured out how to do it :)
B
28
S
5
G
5
Posts: 30
Reputation: 5,841

Post » Wed Jan 29, 2014 4:11 am

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).
B
108
S
26
G
260
Posts: 4,435
Reputation: 146,195

Post » Sat May 09, 2015 5:58 pm

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.
B
11
S
1
Posts: 63
Reputation: 658

Post » Sat May 09, 2015 11:51 pm

@sorbias

Sorry for my pool english either.
B
108
S
26
G
260
Posts: 4,435
Reputation: 146,195

Next

Return to Completed Addons

Who is online

Users browsing this forum: neverk and 2 guests