Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Smooth" Movement of Something Trailing a Player..
#1
Pretty Much what the topic says, i've got something trailing behind the player, but when the player moves, the trailing object just "jumps" to the next tile over... i know it has something to do with the x/y offsets but i'm not sure how to make it work. I'm about 95% sure it has to do with these two lines of code. If someone can help me with this/understand it i'd be very greatful Smile

here's the two lines of code:
Code:
If GetPlayerX(Index) = X Or GetPlayerX(Index) = X - 1 Or GetPlayerX(Index) = X + 1 Then
                If GetPlayerY(Index) = Y Or GetPlayerY(Index) = Y - 1 Or GetPlayerY(Index) = Y + 1 Then

The Blt Code Comes after that, so i blts 360 degrees around the player, but like i said it "jumps" in a direction as the player walks.
Reply
#2
As your blting just add the x and y offsets to the x and y of the trailing thing.
Reply
#3
that's what i thought, so i have my blt updated, but i guess it's a bit different than that, because i guess it does follow me... i'll try and make a desktop video capture thing to show what's happening and it will make more sense i think.

thanks, john.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)