#1, by HelixAbyssFriday, 22. January 2016, 02:17 9 years ago
Hi, I have another question. How do I go about having my character go up/down stairs properly? Originally I had a separate outfit with the walking up stairs animation as the walk animation and then when the player chooses to go up a staircase, I hide the cursor, change the outfit, send them to the proper point, then change the outfit back and unhide the cursor. This works just fine for some stairs, but on side views it does not because the character will face the wrong direction. So for example if I have a side view of stairs and the character is supposed to face to the right while walking up the stairs, because of the way the point is offset from the initial point, she uses the back-right version instead. I searched all over and it doesn't seem like there is a way to temporarily lock the direction.
So, attempt number 2. I tried creating an object with the character's walking up stairs animation and then setting the character's visibility to 0 before showing the animation, then setting the character's position to the destination, hiding the object's animation, and resetting the character's visibility to 100. The problem with this is that I cannot set the tint of objects, so while walking up/down stairs the character pops into their original color and then back to having the appropriate tint. Although noticeable, this doesn't look horrible for the particular scenes I'm working on, however it definitely will look bad on later scenes where there is a more extreme tint.
Ok, now I'm on my third attempt. I made the animations character animations, used the "displacement of current frame" to make the image move within the animation, then made a script that executes on the last frame to set the character's position based on the displacement of the last frame. Well, the problem with this is that doesn't account for the character's scale, so when the animation restarts the character doesn't exactly get set to the right position.
My questions then are: Is there a way to temporarily lock the character's direction? Or is there a way to move the character while they are displaying a different animation than their walk animation? I am completely out of ideas at this point so any advice is welcome!