Moon, Sun Behaviour in A Platform Game

Get help using Construct 2

Post » Tue May 14, 2013 1:17 pm

Hi friends. I have searched forums about my question but i couldn't find any answer about it.

How can i make moon behaviour in a platform game. I want the moon to move with the player at the top and i want it to stay at the middle of the screen all the time. It must be sticked to its position in the middle and must follow the player. How can i do that?

Here is the simple capx example. There is the moon and a player moving on a platform. But i cant make the moon behaviour.

https://www.dropbox.com/s/04u3395x035ymg0/myProj.capx
B
7
Posts: 17
Reputation: 403

Post » Tue May 14, 2013 1:25 pm

How to make a HUD

This is what you looking for.


If you want that the moon follows the player just make:

+Every Tick
-> Set Moon X to player.XDarklinki2013-05-14 13:27:29
B
15
S
6
G
6
Posts: 512
Reputation: 5,550

Post » Tue May 14, 2013 1:26 pm

Put the moon in a new layer and change the parallax to 0

https://www.dropbox.com/s/wosi2f6zllusw16/myProj.capx




Edit: Ops... @Darklinki was fasterSeasky2013-05-14 13:27:51
B
21
S
7
G
7
Posts: 49
Reputation: 5,224

Post » Tue May 14, 2013 1:39 pm

@Darklinki @Seasky

Thanks. Guys. I think HUD behaviour will do it.
B
7
Posts: 17
Reputation: 403

Post » Tue May 14, 2013 2:07 pm

And special thanks to @Seasky. I didn't see you modified and uploaded capx file. :)rudyardKipling2013-05-14 14:16:28
B
7
Posts: 17
Reputation: 403

Post » Tue May 14, 2013 2:19 pm

What wait I also want an special thanks, I make you an example xD
B
15
S
6
G
6
Posts: 512
Reputation: 5,550

Post » Tue May 14, 2013 2:39 pm

Okey okey :D And other speacial thanks goes to @Darklinki. :)
B
7
Posts: 17
Reputation: 403

Post » Tue May 14, 2013 3:27 pm

Haha
You're welcome! :D
B
21
S
7
G
7
Posts: 49
Reputation: 5,224


Return to How do I....?

Who is online

Users browsing this forum: mercuryus, Naightwolf, Skebab, Yahoo [Bot] and 19 guests