Can Objects Fade out over time?

Get help using Construct 2

Post » Thu Jun 20, 2013 12:40 am


Hi all,

New here. I'm an artist on a development team and we are using this fine engine. Currently I'm producing art for a prototype to see if the planned mechanics will work.

Before I waste my time as well as the lifespan of my head hair could someone please answer the two questions I have below. Doing so will help me better plan out my renders. Thanks in advance.

1. Is it possible to set an animation of a layer (object) moving side to side, up and down, or even diagonally within C2?

2. Is it possible to animate a layer (object) fading out to zero opacity over time?
B
3
Posts: 18
Reputation: 236

Post » Thu Jun 20, 2013 1:44 am

Hi, welcome to the community.

1. There are many ways to move things around in C2, but how you do it depends very much on what kind of movement you have in mind. Maybe you could be a bit more specific? The beginner's guide covers a lot of the basics as well, so you might want to skim through it if you haven't already.

2. This one's probably slightly more complicated, first we need a variable to use as a timer, then we can adjust the opacity of the object based off that variable. Here's an example (comments inside):

FadeOverTime.capx (r134)
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Thu Jun 20, 2013 5:10 pm

@Nimtrix

Thanks bro! Great example. Really appreciate it!

As to my first question, here's an example of what I'm asking for:

can I give the impression of moving a "Manhole Cover" by pressing/clicking on the manhole png object and manually slide it away from the man hole tunnel or choose to manually slide it back into place. Can something like this be done?

And can it be moved in any direction? Up, down, side to side, and diagonally?

Thanks.
B
3
Posts: 18
Reputation: 236

Post » Thu Jun 20, 2013 6:29 pm

Well yeah, I'm not sure if this is what you're looking for, but moving object with the mouse is really easy if you just add the Drag&Drop behaviour:

ManholeCover.capx (r134)

I also added an event to snap the cover back to the hole if you drop it on top of it. Like I said, many ways to move objects. And yes, all directions are possible.Nimtrix2013-06-20 18:30:06
B
27
S
8
G
8
Posts: 903
Reputation: 8,452


Return to How do I....?

Who is online

Users browsing this forum: Congrats2u and 7 guests