Objects following player.

Get help using Construct 2

Post » Fri Aug 10, 2012 3:57 am

@Kid4lynn Like you said. If the player Y is less than the follower, it would simulate the jump.
B
84
S
30
G
22
Posts: 384
Reputation: 18,462

Post » Fri Aug 10, 2012 4:01 am

@jogosgratispro Yes... less than in construct means above.
B
13
S
3
G
1
Posts: 44
Reputation: 1,152

Post » Fri Aug 10, 2012 4:07 am

@Kid4lynn I know. What I mean is that the object follower should wait until it gets to the hole to jump instead of jump exactly at the same time as the main player.

I will try to put something together to show you
B
84
S
30
G
22
Posts: 384
Reputation: 18,462

Post » Fri Aug 10, 2012 4:43 am

@jogosgratispro Oh I get what you mean now, you'd probably need extra objects for that, unless you use when the object is in the hole, what ever object is the floor for that hole, he jumps.
B
13
S
3
G
1
Posts: 44
Reputation: 1,152

Post » Fri Aug 10, 2012 3:45 pm

you can have the object check for no collision infront of it and just below it and have it control its own jumping
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Post » Wed Dec 11, 2013 2:06 am

What If there are more than one player, what If I have 2 Players or more in one stage?. How to make each enemy pick random Players to follow/attack?
B
11
S
2
G
2
Posts: 62
Reputation: 2,153

Post » Thu Sep 17, 2015 3:44 am

@Nimtrix, sorry to bring up an old question! but I was trying to create a follow mechanic and ended up having the same issue @shifty was having where the object following the player goes to the middle of them and wobbles, and I wasn't sure how to fix it. I'm not sure if I have a wrong event set-up like Shifty did or not (I couldn't check since their link doesn't work anymore), but I don't think I put in the events wrong (at least from what I can see haha). I might be doing the same thing where I need a fresh pair of eyes, though..

I can't post an url so sadly I can't give you the capx file, but I could take a screenshot or something probably or split up an url link.
B
5
S
1
G
1
Posts: 7
Reputation: 364

Post » Mon Oct 19, 2015 2:21 pm

Message: joeypunkrock is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
@ZoombiiPanda , I believe your issue can be solved by creating an instance variable 'distanceFromCat' on the kitten object and set it anything above 0. Like 50 or 100.

Then in the events create a System - compare 2 values and set the parameters - First value 'abs(cat.X-kitten.X) / Comparison - Greater Than / Second Value 'Kitten.DistanceFromCat'.

Like so (I don't know if links work...) - .

---

@onzephyr . I also apologies for bringing up such an old thread but I also have a question! In your example the kittens have a sort of delay when they simulate the left and right movement. I tried to recreate your example but the 'kittens' would move exactly when the player moves, no delay. Any ideas?
B
3
Posts: 2
Reputation: 179

Post » Fri Apr 08, 2016 3:47 am

onzephyr wrote:Thinking there are loads of fun ways to do this. Here is the first one that came to mind,using platform behavior on the kittens , like your original
Event comments explain it a bit. and the kittens now have a variable that allows you to give each kitten it's own distance if you need it.
chasing_idea.capx dropbox downloadonzephyr2012-03-13 23:38:36

hi buddy, how you doing?
I am asking if i am using a player with 8 directions behaviour and the followers also, how can i make these objects to follow the steps of the player with a 8 directions behaviour
B
8
Posts: 6
Reputation: 308

Previous

Return to How do I....?

Who is online

Users browsing this forum: blackhornet, jeffige, TheHat and 0 guests