Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Marion on Sun 07/04/2019 17:12:20

Title: Follow_exactly : character always stays in the same direction
Post by: Marion on Sun 07/04/2019 17:12:20
Sorry if this has been asked before, I didn't find anything when I searched.

I wanted to use the FollowCharacter(Follow_exactly) command to simulate a rider on a horse back, the rider and the horse are two different characters.
When they go right, everything's ok, the rider seems to ride the horse when walking. But when they turn left, the rider doesn't face direction, only the horse, and then he rides backwards !
The rider does have different directions in his views, I have flipped the frame in the Left loop. But they are not used when he walk left following the horse.
How can I fix this ?..
Here is the video showing the problem : https://youtu.be/vEyjfcZfol8
Title: Re: Follow_exactly : character always stays in the same direction
Post by: Slasher on Sun 07/04/2019 17:31:58
You need something like

Code (ags) Select

function repeatedly_execute_always()
{
player.loop=chorse.loop;  // is horse main character or vice versa?
}


You will probably need to adjust player's x for loop chosen so he sits in correct position.....

I'm almost doing this for a player and a jeep and a speedboat..


Title: Re: Follow_exactly : character always stays in the same direction
Post by: Marion on Sun 07/04/2019 17:41:51
Oh yes that could help, thank you very much, I try ! :)
Title: Re: Follow_exactly : character always stays in the same direction
Post by: Marion on Sun 07/04/2019 17:50:03
It works, thank you very much :)
Title: Re: Follow_exactly : character always stays in the same direction
Post by: Cassiebsg on Sun 07/04/2019 18:55:17
If it looks "choppy" use late_repeatedly_execute_always().  ;)