to the next level, without the use of new event

Discussion and feedback on Construct 2

Post » Tue Dec 04, 2012 11:11 pm

[QUOTE=amigoj] [QUOTE=harrio] @amigoj

i'm not sure what you want exactly. but this might be a method of getting to what you want. @valdarko explained this to me about his level transitions...

http://www.scirra.com/forum/your-c2-tests_topic41840_page34.html[/QUOTE]

very good example. is it possible to download the source code of the game? [/QUOTE]

i pretty much understand what he did from his example, but you can ask @valdarko if he can make an example capx for you.
B
52
S
17
G
15
Posts: 1,029
Reputation: 26,339

Post » Fri Dec 07, 2012 8:30 am

[QUOTE=ash1221] create a global variable called levelno.
every time level is comdd 1 to levelno.
go to layout by name 'level&levelno.' >
it works in theory but i do not have access to C2 now and for a considerable amount of time.[/QUOTE]

I probyval done through "the transition to the next level." Posted in line Lauoutname + 1. But this string lauout.

Sorry for my bad English. Do not really know the language.
B
1
Posts: 5
Reputation: 410

Post » Fri Dec 07, 2012 5:08 pm

[QUOTE=amigoj] [QUOTE=ash1221] create a global variable called levelno.
every time level is comdd 1 to levelno.
go to layout by name 'level&levelno.' >
it works in theory but i do not have access to C2 now and for a considerable amount of time.[/QUOTE]

I probyval done through "the transition to the next level." Posted in line Lauoutname + 1. But this string lauout.

Sorry for my bad English. Do not really know the language.[/QUOTE]

Ugly way: If your levels are in strings, make an array where each index at level number has corresponding level name, you can use that to refer level transitions in "level+1" manner described before.
B
24
S
8
G
7
Posts: 756
Reputation: 7,202

Post » Thu May 09, 2013 10:42 pm

@amigoj

sorry for the late, i just stomp to this post today, you still need to know how to make an abrupt screen transition like i did on my test project, or level transition?

the next time you need some help, say the kind/type of game you are making and put some examples(games that have the same mechanic), because you can mimic pretty much anything with events, you just need to think "event-wise". the nice of construct 2 is this intuitive approach.

this is the explanation i did for @harrio back in the day:



the scene switch are just red squares objects with the same screen size (side by side) and i'm using the event: when Player is overlapping Square>system-scroll to(Square.imagepointX(0), Square.imagepointY(0)

the logic here is simple, while the character is overlapping the red square object, the screen will be stopped in the Origin of the red square object(the middle of the object)

so, i just did this event 1 time for the red square object, and now i can copy the square object every time i need other screen, no need to remake the event. this must not be the best way to make this, but is very simple and i understand how it works... a little; i dont know if it have any perfomance issue but it works for me.valdarko2013-05-10 01:30:23
B
48
S
5
G
6
Posts: 210
Reputation: 6,247

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: j0schi and 8 guests