How do I spawn it ou of the screen regardless of resolution?

Get help using Construct 2

Post » Tue Aug 12, 2014 6:53 pm

I would like to know how to spawn an enemy out of the player view (out of the game screen) regardless of resolution/window size.
Since i'm developing my game for mobile devices, I would to like to make the enemies spawn correctly in any device.
Any tips?
B
12
S
3
G
1
Posts: 80
Reputation: 2,109

Post » Wed Aug 13, 2014 2:24 pm

Anyone can help me?
B
12
S
3
G
1
Posts: 80
Reputation: 2,109

Post » Wed Aug 13, 2014 2:28 pm

I don't know if it works, can't try it right now, but try System>Create Object on WindowLeft(or top, bottom, right).X-100, WindowLeft.Y
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Wed Aug 13, 2014 2:32 pm

Sisyphus wrote:I don't know if it works, can't try it right now, but try System>Create Object on WindowLeft(or top, bottom, right).X-100, WindowLeft.Y


Thanks for the idea, but this WindowLeft command doesn't exist...
B
12
S
3
G
1
Posts: 80
Reputation: 2,109

Post » Wed Aug 13, 2014 2:34 pm

alan349 wrote:
Sisyphus wrote:I don't know if it works, can't try it right now, but try System>Create Object on WindowLeft(or top, bottom, right).X-100, WindowLeft.Y


Thanks for the idea, but this WindowLeft command doesn't exist...

I don't remember the command, i don't have c2 right now, maybe it calls ViewportLeft, Right, Top, Bottom.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Wed Aug 13, 2014 2:43 pm

Here the capx example, it work's the way you describing it.
You do not have the required permissions to view the files attached to this post.
B
22
S
9
G
7
Posts: 421
Reputation: 6,543

Post » Wed Aug 13, 2014 3:45 pm

You can also use LayoutWidth / LayoutHeight, as you know how big your layout is
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Wed Aug 13, 2014 4:03 pm

caiorosisca wrote:You can also use LayoutWidth / LayoutHeight, as you know how big your layout is

Man, i'm developing a Platformer RPG, so the layout width is alot bigger than the window size...
B
12
S
3
G
1
Posts: 80
Reputation: 2,109

Post » Wed Aug 13, 2014 4:05 pm

Sisyphus wrote:
alan349 wrote:
Sisyphus wrote:I don't know if it works, can't try it right now, but try System>Create Object on WindowLeft(or top, bottom, right).X-100, WindowLeft.Y


Thanks for the idea, but this WindowLeft command doesn't exist...

I don't remember the command, i don't have c2 right now, maybe it calls ViewportLeft, Right, Top, Bottom.


I've already tried viewpoRight and Left, but the Left one don't seem to work correctly, spawning the enemies at a fixed point only...
B
12
S
3
G
1
Posts: 80
Reputation: 2,109

Post » Wed Aug 13, 2014 4:06 pm

Do you want to spawn them on specific places over the layout? or just wherever but outside windows size?
ImageImageImageImage
B
157
S
64
G
41
Posts: 2,590
Reputation: 34,640

Next

Return to How do I....?

Who is online

Users browsing this forum: Apollo14, Lordshiva1948, Meqara, mrkaio, Yahoo [Bot] and 1 guest