Making a screen slide in...

Get help using Construct 2

Post » Sun Apr 15, 2012 2:58 pm

Is there a way to make a screen slide into the main view?

Basically, I'm trying to have the user select a settings screen and want that to slide in over the main screen. I created a separate layout for this settings screen and the only way to make it appear is the "Go to layout" action. This makes the screen appear instantaneously however I'm looking for an effect that slides from the left edge.

Any ideas or examples on how I can achieve this?

Thanks
B
6
Posts: 7
Reputation: 391

Post » Sun Apr 15, 2012 3:23 pm

Maybe , you can force the view to be in a Sector of the screen and if the user clicks or presses a key scroll on X or Y, and for the smooth effect you can use DeltaTime Multiplier like :
#
if onkey pressed "enter"
for ( actualX or Y to new X or Y)
scroll x ( newx or y * dt * 1(or the amount of ticks you want)
#

Hope this works for you, sorry for the fast reply i'm not in my home :)

B
23
S
5
G
2
Posts: 17
Reputation: 3,521

Post » Sun Apr 15, 2012 3:48 pm

Thanks for the reply.

When you say a sector of the screen do you mean like making my main screen double the width and putting the "settings" screen on the second half and just scroll it in using the code you provided?
B
6
Posts: 7
Reputation: 391

Post » Sun Apr 15, 2012 4:12 pm

Yay, i mean that :)

Try it ;)
B
23
S
5
G
2
Posts: 17
Reputation: 3,521

Post » Sun Apr 15, 2012 9:00 pm

Sorry Vhael. I'm having trouble with the code. When you have a minute can you tell me how I use the code you povided. For example, what does "( actualX or Y to new X or Y)" refer to...the layout? Does "Scroll x..." also refer to the layout?

So far I have these conditions:

Mouse: On left button clicked on sprite
System: For "" from scrollx to scrollx + 1000

...with this action:
Set scroll X to scrollx * dt * 1

...but its not doing anything. I'm a noob so excuse me for my ignorance. Still reading and learning.

Thanks in advance.
dynot2012-04-15 21:01:25
B
6
Posts: 7
Reputation: 391


Return to How do I....?

Who is online

Users browsing this forum: YoHoho and 13 guests