How do I... well, you will know when you open this

Get help using Construct 2

Post » Sat Jun 28, 2014 1:55 pm

I want to make the things work like that when all instances of an object, are in defined place, system goes to another layout. How to do this?
B
4
Posts: 21
Reputation: 242

Post » Sat Jun 28, 2014 2:10 pm

You need to provide more clearer information about what you are trying to achieve.

If at all possible, provide a .capx showing what you have and what you require/expect to happen.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
86
Posts: 5,487
Reputation: 59,760

Post » Sat Jun 28, 2014 5:52 pm

Sounds like a co-op game where you go to next level when teammates are all in the right spot? I'd do this in one event like:

(option 1: An invisible sprite over the entire area that objects must overlap, code assumes there can be any number of players)

Conditions:
+PlayerSprite is overlapping ExitSprite
+System Compare PlayerSprite.PickedCount = PlayerSprite.Count (all players here)

Actions:

-> Go to next layout

(option 2: A distance check from a location)

Conditions:
+System Pick (By Comparison) PlayerSprite where expression distance(PlayerSprite.X PlayerSprite.Y, TargetX, TargetY) <= 32
+System Compare PlayerSprite.PickedCount = PlayerSprite.Count (all players are within 32px of that point)

Actions:

-> Go to next layout

Hope that helps!
"Construct 4 lets YOU make advanced games! (they wont run anywhere)" Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
124
S
42
G
17
Posts: 2,228
Reputation: 19,893

Post » Sat Jun 28, 2014 6:21 pm

Thank you @Jayjay! Well, a co-op is too hard for me, as I am an almost complete n00b in C2 :P These PickedCount and Count are global variables or what?
B
4
Posts: 21
Reputation: 242

Post » Sat Jun 28, 2014 7:25 pm

They are part of the Sprite object expressions (same as how every Sprite automatically has Sprite.X and Sprite.Y) No global variables needed there :)

If you go with option 2, TargetX and TargetY are examples of variables though
"Construct 4 lets YOU make advanced games! (they wont run anywhere)" Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
124
S
42
G
17
Posts: 2,228
Reputation: 19,893


Return to How do I....?

Who is online

Users browsing this forum: dop2000, Yahoo [Bot] and 47 guests