chajapa Posted June 27, 2017 Posted June 27, 2017 I have a few ... i guess they'd be classed as idle animations. Single pose, with head tracking. Example is one called AintIHot.hkx. If I debug.sendAnimationEvent("ELVAintIHot.hkx") the target goes into the pose. Facing me. (I added the first 3 letters corresponding to a mod I'm working on) Now another example would be one called ELVKneelButtUp. She kneels.... butt up.... but she's facing me. I'd like her to be turned away from me. Is there some parameter I can enter for FNISforModders for the specific animations to turn them? I'm not an animator and have no idea how to even OPEN an HKX file nor would I know what to do if I managed it. Thanks
WraithSlayer Posted June 28, 2017 Posted June 28, 2017 FNIS doesn't control which direction the animation faces, the actor's position in the world does. You can manually set the direction for an actor through SetAngle, after you've started their animation. The third parameter, afZAngle, is what you need, as it rotates actors to the side. Assuming you want the target's angle to be relative to the player's angle, this should do the trick: Target.SetAngle(Target.GetAngleX(), Target.GetAngleY(), (Game.GetPlayer().GetAngleZ() + 180)) Remove the +180 bit for animations that aren't facing the way you want.
chajapa Posted June 28, 2017 Author Posted June 28, 2017 Would this work in dialogue by using the speaker reference?Like...akSpeaker.SetAngle(.......etc..... ?I gotta read that one.... thanks hmmm... actually... just want to turn the other actor around. They start out facing the player. So rotating them is relative to their own starting position. so... if akSpeaker is valid for the function... something like... Debug.SendAnimationEvent(akSpeaker, "ThisAnimation") akSpeaker.SetAngle(akSpeaker.GetAngleX(), akSpeaker.GetAngleY(), (akSpeaker.GetAngleZ() + 180)) So... as she runs ThisAnimation she'll spin around facing away from me. I'll mess with it tomorrow. See if I can get it to work. Appreciate the help
chajapa Posted June 28, 2017 Author Posted June 28, 2017 Woot! This works! Debug.SendAnimationEvent(akSpeaker, "ThisAnimation") akSpeaker.SetAngle(akSpeaker.GetAngleX(), akSpeaker.GetAngleY(), (akSpeaker.GetAngleZ() + 180)) Utility.wait(10,0) Thank you, WraithSlayer! I'm using that fragment in the "Begin" section of the topic and then sending: Debug.SendAnimationEvent(akSpeaker, "IdleForceDefaultState") in the "End" section. But I'm honestly not sure if I need to send the IdleForceDefaultState because it LOOKS like the actor returns to default state after the animation ends. A tiny bit more testing, but this is working out nicely.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.