Endless Runner help

Get help using Construct 2

Post » Fri Dec 27, 2013 11:24 am

Hello all, Im new to COnstruct 2 and I find it amazing to use and more powerful than the previous engine I used (GameSalad). Im doing an endless runner where you move around platforms but you can move left right and jump. And the camera somehow follows you but in the end is the world thats coming to you.

The thing I cant figure out is to go from regular platformer (jumping through platforms, moving platforms etc...) to a gravity thing where I want the character to rotate around a big object (like a planet to give a good idea of "big". I cant stitch them together. Any help please?

B
12
S
3
G
1
Posts: 79
Reputation: 1,055

Post » Fri Dec 27, 2013 11:37 am

If you use platform behaviour you can set it's angle of gravity. Just set it's angle to the center of the planet every tick and you're ready to go..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Dec 27, 2013 12:43 pm

Thanks, makes a lot of sense. But how can I do "set it's angle to the center of the planet every tick".

I choose the "Platform - Set angle of gravity" action to the every tick event but it asks for the angle.

Maybe I didn't understand it correctly but I did this... I tried planetspin.x,planetspin.y,player.x,player.y but I want to be more open ended. Not just a specific planet, any planet it decides to move to.

From platform to planet to platform, something like that. I will work on a .capx file but I have to much graphics and I fear theft.

B
12
S
3
G
1
Posts: 79
Reputation: 1,055

Post » Fri Dec 27, 2013 12:50 pm

Additional logic for which planet you're touching? If player is touching planet A set angle of gravity to planet A, if player is touching planet B set angle of gravity to planet B. These will run every tick automatically.
B
46
S
16
G
79
Posts: 2,171
Reputation: 46,859

Post » Fri Dec 27, 2013 12:55 pm

Maybe adding families, like a planet family (group of planets to spawn, I have another family for the platforms) and set the angle to that family: angle(PlanetsFamily.x,PlanetsFamily.Y,Player.x,Player.Y)?

I don't even know if this family thing is possible since Im messing with the free edition right not. But I willing to buy it if it works that way.
Actually, Im just a few clicks away from the buy button now.Frostolo2013-12-27 12:56:22
B
12
S
3
G
1
Posts: 79
Reputation: 1,055

Post » Fri Dec 27, 2013 12:58 pm

@Plinkie Thanks, Im new to this editor and Im still trying to import my logic from the previous one (GameSalad). Will try it now.Frostolo2013-12-27 12:59:04
B
12
S
3
G
1
Posts: 79
Reputation: 1,055

Post » Fri Dec 27, 2013 1:09 pm

I just thought actually, well I had Super Mario Galaxy in mind, touching won't work as you need to detect gravity pull while in the air. With touching you won't be able to leave the planet you're on so I would set up a gravitational field, like a sprite that surrounds the object but is invisible and if the player comes into contact with this then it takes the gravity angle of the relevant object. If the player is outside any gravity field then you set the angle of gravity to default so the player can just jump normally between planets. In my head this works, erm have fun! : D
B
46
S
16
G
79
Posts: 2,171
Reputation: 46,859

Post » Fri Dec 27, 2013 1:14 pm

@plinkie Thanks a lot I will try to make a force field for the planet and see if it works. I my head it works too. Will post a capx file to show it (if I manage to...).
B
12
S
3
G
1
Posts: 79
Reputation: 1,055

Post » Fri Dec 27, 2013 3:40 pm

I managed to do this example but my player doesnt stick to the planet surface while in the gravity zone. If somebody could help me please?


Edit: Cant post dropbox links until I have more reputation, so... I have to make more.Frostolo2013-12-27 15:57:37
B
12
S
3
G
1
Posts: 79
Reputation: 1,055

Post » Fri Dec 27, 2013 4:27 pm

Here is my capx, if somebody could help me and tell me what I did wrong please?

https://www.dropbox.com/s/nfy7952qsfd6ddf/Endless%20Simple.capxFrostolo2013-12-27 16:27:57
B
12
S
3
G
1
Posts: 79
Reputation: 1,055

Next

Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], JackTYGA, osek95, zill and 38 guests