How do I attatch an object to a player's x but not y

Get help using Construct 2

Post » Wed Mar 18, 2015 12:51 am

I'd like to attach an object to a player's image point and stay with the player as it moves left and right.. but I want the y object to move in a negative motion. Giving the illusion of it floating up. I've gone through several attempts and have gotten the object to spawn, set itself to the player, and move up.. but only keeping the initial x position that it started.

Any help would be appreciated.
I must not fear. Fear is the mind killer.
B
10
S
1
G
1
Posts: 22
Reputation: 966

Post » Wed Mar 18, 2015 2:10 am

what is negative motion?
Image
B
58
S
13
G
6
Posts: 271
Reputation: 12,128

Post » Wed Mar 18, 2015 2:11 am

.....like this..or?
You do not have the required permissions to view the files attached to this post.
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Wed Mar 18, 2015 2:28 am

@danuyos Bad wording on my part. I meant going up the y axis, which a negative value.

@korbaach Thank you, I will definitely check it in the morning. (In bed on my iPad now)
I must not fear. Fear is the mind killer.
B
10
S
1
G
1
Posts: 22
Reputation: 966

Post » Wed Mar 18, 2015 6:02 am

Every tick Object.X = Player.X; Object.Y = Object.Y+1
B
14
S
5
G
1
Posts: 189
Reputation: 1,536

Post » Wed Mar 18, 2015 9:22 pm

@korbaach That is an awesome example! I've been wanting to have an excuse to try lerp out. Thank you for that applicable example for me to use.

@bladedpenguin Trying that out now!

Thank you for the responses.
I must not fear. Fear is the mind killer.
B
10
S
1
G
1
Posts: 22
Reputation: 966

Post » Thu Mar 19, 2015 2:14 am

yeah..lerp is cool :D
You do not have the required permissions to view the files attached to this post.
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests