I want to make an object assume an initial position on the level of the game, then be able to change positions but still scroll, of course. For example, the character walks up to the object, picks it up, walks over some more, and drops the object. How would I make it scroll from the new position? Thanks in advance!
- Zparx
Offline
For while the player has it, forget scroll variables and have it go to the player. When its dropped, record the scrollX variable value and have it fall until it hits ground, then use the recorded scrollX as its new position.
Offline
Prestige wrote:
For while the player has it, forget scroll variables and have it go to the player. When its dropped, record the scrollX variable value and have it fall until it hits ground, then use the recorded scrollX as its new position.
YOU'RE RIGHT! I knew it was on the tip of my tongue. Haha, thank you!
Offline
SuperGuys wrote:
What if it is X and Y scrolling?
next time make a new post.
For both X and
Y scrolling, it is essentially the same. If the player picks it up, ignore X and Y scrolling, and when the player puts it down, record the X and Y positions as the new position fo the object.
Offline