Movement like a RPG with multiple characters.
https://drive.google.com/open?id=0B8Wg-SuZt4oGeHJXWlQwa1pBT0k&authuser=0
Link to what I have currently, basically the up and down work properly, since that is all I have setup(can make it work left and right as well IF I position player 2 accordingly).
The issue is when Player 1 moves left or right and breaks the current follow parameters.
I have tried everything to re-align Player 2, from:
If Player2.X is greater then Player1.X and Direction = 4(left), Player2 Move to Player1.Y, or Move up as long as Player2.Y is less than Player1.Y(provided Player2.Y was below Player1.Y else the opposite for Move down).
But all these methods fail, for some reason the Move To, or Move (if greater/less than and does not equal) always overshoots the co-ordinates by a few pixels(why I don't know, tried Real vs Integer, both over shot).
Also if the movement style doesn't make sense, what I'm trying to do is:
Player1 Moves up/down - Player 2 follows -32/32 pixels behind.
Player1 Moves left - Player 2 Moves down/up(depending if Player2 is below/above Player1) until it equals Player1, and when aligned moves Left behind Player1.
Does anyone have ANY guides around this style of movement, if there is a way to make it so the Move/Move To commands stop overshooting saved X/Y's, or if how I'm currently trying things is close but just needs a fix.
P.S Sorry for the multiple posts(on similar requests), I'm not sure why the forums seem to be inactive, but this problem is REALLY driving me mad and stopping me from moving forward. Any help would be greatly appreciated.
Thanks.
Comments
Around 15 minutes you can see the type of movement.
15:20*
Sounds like you need to move the player 2 to the heroes last X&Y position each time you change direction, you will also need to think about layers…notice how the follower is in a higher layer as they move up but below the hero when they move down.
GS has no Z ordering for layers so you will have to make 2 actors and swap the alphas from 0-1 on each actor respectively like i did in Zanda.
Below is a quick demo I've just made that should work for you, pop me a mail and i will send it.
Green is hero Blue is follower.
@DeepBlueApps Wow! I would really be interested in this one....
@floatingwoo Zanda has been on sale for a while the demo under your welcome to have for free as I made it to try and help @Impervion
If I get time I will upload it to DeepBlueMarket but would like to put some simple animation in it 1st to make it look pretty
The second video you linked in perfect, the "FollowHero", could I get some code/how you set that up? I already tried Move To last X/Y, but then ran into problems with walls, I was probably doing it wrong? And the "Move To" seems to always over shoot X/Y's by a few pixels? how do you/did you fix that? Thanks.
@DeepBlueApps a gentleman and a scholar
After viewing your project DeepBlueApps, this is mine. I'm not quite sure why you need all those layers and things? I also do have a few issues, sometimes player 2 does teleport, and the main issue is collision with walls now.