Dooge Posted September 10, 2016 Posted September 10, 2016 Can someone point me to the correct command names to dynamically make an actor to a spot walk behind the PC I can determine a point with getpos and getangle, but how to make someone walk there is what I don't know. Perhaps with KeepOffsetFromActor OK I can use this http://forums.bethsoft.com/topic/1585680-tutorial-make-an-npc-walk-forward-without-heavy-math/
Guest Posted September 10, 2016 Posted September 10, 2016 If you want to "dynamically" have an actor to walk to a spot, specific, with a high precision on the spot, then you need something advanced. Do a normal Travel Package. Create a marker (anywhere in the world), set it to the destination of the package. Be sure the travel to procedure ends when the spot is reached. In the package add a script for the "on package start" and another for "on package end". In the start and end you will do pretty much the same stuff. 1) Calculate the position of the xmark. RotationZ = Player.RotationZ posX = math.sin(player.rotationZ)*50 posY = math.cos(player.rotationZ)*50 (Assuming a distance of 50 is what you want.) Place the xmarker to the calculated position and rotation. The end package will be the same, but you do also a EvaluatePackage() on the actor. (So it will run again.) To start the package on an actor do a ActorUtil.AddPackageOverride(yourPackage, false, 100) And remove it when not needed anymore.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.