How do I create a copy of my player

Get help using Construct 2

Post » Mon Jan 16, 2017 10:05 am

Hello,

I'm working on a game and I need to create a reflect on my player and everything that happen to this reflect happen to the main player. It's a bit hard to explain in english for me so here is a image who explain the idea.

Image

Any idea to implement that in construct ? I've no idea where to start
B
11
S
3
G
1
Posts: 14
Reputation: 1,203

Post » Mon Jan 16, 2017 12:03 pm

clone the player sprite
use the pin behavior for one sprite of the player
and duplicate all event of animation for the reflect of the player

or you can

clone the player sprite
event sheet :
every tick > "take the reflect player" > set position to another object
B
9
S
3
Posts: 56
Reputation: 1,003

Post » Mon Jan 16, 2017 2:07 pm

B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Mon Jan 16, 2017 2:32 pm

Wow thanks for this example 99Instances2Go did not know the gravity work like that. So now I need to know how to join both so if the top player is stuck on a platform the bottom one can not move even if there is no platform infront of him.

I think about simply add a invisible collision box so we don't see it, but if I do that the player will not hit the ground and stay in air.
B
11
S
3
G
1
Posts: 14
Reputation: 1,203

Post » Mon Jan 16, 2017 3:21 pm

I did't debug this trough.
But, something like this ?

https://drive.google.com/open?id=0B1SSu ... FBKS0hsUlE
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Mon Jan 16, 2017 4:42 pm

Yeah that's perfect thanks again. For optimisation, can't we use the UID instead of create two identical sprite ?
B
11
S
3
G
1
Posts: 14
Reputation: 1,203

Post » Mon Jan 16, 2017 4:56 pm

How would that be optimisation ?
And, up to you if you wanna dive into the swamp that comes with picking 2 instances of the same object and compare them
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Mon Jan 16, 2017 9:55 pm

Do you have access to family's ?
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Tue Jan 17, 2017 11:18 am

Well we create two time the same object and not two different object. Yes i've access to family
B
11
S
3
G
1
Posts: 14
Reputation: 1,203


Return to How do I....?

Who is online

Users browsing this forum: asdtricky, brunopalermo, Exabot [Bot], TRMG and 24 guests