Posts: 292
Threads: 87
Joined: Feb 2011
Reputation:
0
Hello everybody, well i am making a clothing system sort of like in SinglePlayer and i ran into an issue. My issue is that when i use SetPlayerSkin, the players animation gets turned off, meaning that he gets back to his coordinates and i need him to stay behind the clothing door. Because as the animation ends and the player freezes he is behind the door, but instantly after i change his skin he appears in front of the door... Any idea on how to make him stay behind the door as at the end of the animation?
Posts: 292
Threads: 87
Joined: Feb 2011
Reputation:
0
If i redo the animation instantly after changing skin, than the player aprears outside the door againa and moves behind the door..
Posts: 637
Threads: 23
Joined: Feb 2013
Reputation:
0
put a line of code that will transport player to the back when he comes to the front.
Posts: 170
Threads: 10
Joined: Sep 2011
You have to use setplayerpos after end of first animation. No other way, setplayerskin will always refresh animation.
Posts: 3,085
Threads: 37
Joined: Nov 2012
Reputation:
0
I don't believe there is an efficient way around this. Changing the player's skin essentially resets the animation, so the player will briefly re-appear on their current position regardless of their current animation. In single player, the player's skin is never changed, objects are only attached to the player. That's why you never see CJ briefly appear in front of the door before he exits the dressing room.
There might be some workaround by fiddling with camera positions, player skins and positions and tampering with animations, but I highly doubt you'll get it to look flawless no matter what you try.