spawn and object center screen - solved

Get help using Construct 2

Post » Sun Jan 06, 2013 1:29 am

Title says it all pretty much.

I've searched around, apparently windowwidth/height it no longer the way.

Ashly mentioned viewport here - http://www.scirra.com/forum/windowheight-selfheight-not-centering-n-stretch_topic53031.html

But that doesn't seem to be working.

Any suggestions guys? Bit stumped on this one, thanks for reading :)Toby122013-01-06 01:37:34
B
11
S
2
Posts: 43
Reputation: 1,411

Post » Sun Jan 06, 2013 1:31 am

(ViewportLeft("Layer") + ViewportRight("Layer")) / 2
(ViewportTop("Layer") + ViewportBottom("Layer")) / 2

^ That should work fine. Make sure you substitute "Layer" with your layer name.
Moderator
B
72
S
13
G
11
Posts: 900
Reputation: 11,783

Post » Sun Jan 06, 2013 1:37 am

I did rename it, but me being stupid (blaming tiredness haha) called it "3" instead of the actual layout name!

It worked now. Thanks :DToby122013-01-06 01:37:25
B
11
S
2
Posts: 43
Reputation: 1,411


Return to How do I....?

Who is online

Users browsing this forum: gregorysforster, WhosWho and 18 guests