Make an object scroll on the spot?

Get help using Construct 2

Post » Wed Jan 18, 2012 12:35 am

Hi all,

I was just wondering if it was possible to make an object scroll on the spot - into itself (incase i did a terrible job of explaining, ill show you with a picture!).



I want the platform to stay in place - yet scroll into itself as to give the effect that the arrows are moving.

I can achieve this through an animation - though it seems like something that should be possible through events.


Anyone have any ideas? (Greatly appreciated if so!)
GenkiGenga2012-01-18 01:30:53
ImageImage
B
73
S
16
G
6
Posts: 1,038
Reputation: 10,473

Post » Wed Jan 18, 2012 1:33 am

Traditionally that would be done with an animation. In this particular example you'd need just a single arrow animation and could place three next to each other.

There are ways to do it with events and some extra sprites but that would be more work and harder to debug.
B
12
S
3
G
3
Posts: 73
Reputation: 2,647

Post » Wed Jan 18, 2012 7:57 am

Thanks for the response Cross,

Thats unfortunate - The current way to achieve a simple *continuous* scrolling background is a bit involved.

(Edit: This is not actually true, You can do it in one simple event)

I wonder if this is on the to do list (if it is its probably in the unimportant section).



Even if I did put 3 blocks together, unless the block exits the layout there wouldnt be a way for me the get it back in place would there?

(I only found 1 example of a continuous scrolling background - using two images, i played around with it but i couldnt get the image to appear half way into the screen for instance, it always needed to exit and enter from the edge of the layout).

GenkiGenga2012-01-18 16:15:02
ImageImage
B
73
S
16
G
6
Posts: 1,038
Reputation: 10,473

Post » Wed Jan 18, 2012 9:15 am

What exactly are you trying to achive? Maybe you can post your CAPX?!
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Wed Jan 18, 2012 11:41 am

Hi Weishaupt, there is no example capx yet because im trying to figure out the best way to do this:

Im adding effects to my scrolling platformer, in the beggining there is a patch of water, i would like to give it a bit of (cheap) animation so its not so static.

(The platform in my original post represents the water, i would like the image to constantly move in one direction and repeat itself, but staying in the same position while doing so).

I do know how to achieve this (effect) with an animation but it would means i have to use sprites - pretty big one(s) at that, i think im pushing performance as it is.

Im thinking of trying the solution posted here: http://www.scirra.com/forum/continuous-scrolling-background-from-parts_topic48041.html

And then possibly using a layer to mask the areas that there is no water. It just seems excessive for what im trying to do. :/

Thoughts?GenkiGenga2012-01-18 11:45:08
ImageImage
B
73
S
16
G
6
Posts: 1,038
Reputation: 10,473

Post » Wed Jan 18, 2012 11:45 am

So, what you are saying is, that you want to create a side2side scroller where the Avatar stays in the middle of the screen?
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Wed Jan 18, 2012 12:05 pm

http://www.scirra.com/forum/infinitely-scrolling-background_topic38454.html

Here is a similar post to what im trying to achieve.

The only difference is - im trying to do it on a smaller scale. This guy wants his background to be scrolling regardless of whether he is moving or not.

I want the water to be scrolling regardless of whether i move - like watching a waterfall. This water doesnt take up the entire layout - in fact only a small portion, so using a strategy that loops once it exits the layout is not efficient. I need it to loop before it reaches the end of the layout.

Im looking for a video to show an example.

(That post talks about "offset" as a possible solution - i have to find out what that is, manual time).GenkiGenga2012-01-18 12:08:16
ImageImage
B
73
S
16
G
6
Posts: 1,038
Reputation: 10,473

Post » Wed Jan 18, 2012 12:08 pm

The best way to do that kind of thing is texture scrolling. This method is used in some 3D game to fake conveyor belt, waterfall, and stuff like that.
And it's should be possible with a modified tiledbg plugin. But I prefer to wait for the official tiledbg plugin to evolve. I think a fork in plugins is too messy.
So maybe it can be a suggestion for Ash.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Wed Jan 18, 2012 12:45 pm

Offset is not in c2 it seems.

Thanks for your time guys, I guess im going to have to come up with another cheap way to give the water some life.

Ill post it in the suggestions for what its worth.

(Edit: follow here if interested)
http://www.scirra.com/forum/suggestion-for-continuous-scrolling_topic48238.htmlGenkiGenga2012-01-18 17:06:59
ImageImage
B
73
S
16
G
6
Posts: 1,038
Reputation: 10,473


Return to How do I....?

Who is online

Users browsing this forum: Draconinho, luisgmolina, Magistross, nedzad, nimos100, R0J0hound, Rezzon71 and 31 guests