So I'm trying to get some objects to follow the player around.
The easiest way I've found so far is to make the objects platformer behaviour (which has a lot of drawbacks). I've got one object working but when I copy paste it they will not run as seperate objects but rather as two twin objects (one stops moving the other does as well).
I want them to act seperately from each other. :/
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 download
Thank you zeph. Much appreciated.
It's something I started toying with on my way home from work.
I will see if I can get something interesting going as a proof of concept. As you can tell from my tiles my artist side of me isn't very strong. :)
Loving construct2 and I've been playing around with it for a week or 2 but now I think it's time to produce something. So I'm also making a project with this kind of follow behaviour and i've created my capx by recreating the above, but for some reason instead of the kitten or "lilbro" in my case staying a distance away from the cat (bigbro for mine) it just travels to the centre of the sprite then wobbles. I've got a feeling that this is one of those things where you stare at something for so long and not see it and then someone else will see it straight away. I would appreciate another set of eyes before I go crazy.
You need to put the last two events as sub-events of the first. You can do this by dragging them to the bottom of the first event in the event sheet. The manual also covers sub-events.
Aha! Thank you Nimtrix it works!! <img src="smileys/smiley4.gif" border="0" align="middle" />
What if there is a hole? How can you make it follow the player without adding additional objects to the game?
jogosgratispro probably just add another event that says if the players Y is less than the object thats following the players Y, then simulate jump for the object following.
Kid4lynn It makes sense but it wouldn't work because the follower would fall into the hole since it is jumping before it gets to the hole.
I think the best idea is to place some invisible objects, so the follower would simulate jump when hit it.
Develop games in your browser. Powerful, performant & highly capable.
jogosgratispro why would he jump before it gets to the hole?
Kid4lynn Like you said. If the player Y is less than the follower, it would simulate the jump.
jogosgratispro Yes... less than in construct means above.
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
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.
you can have the object check for no collision infront of it and just below it and have it control its own jumping