Navigator.MoveTo throws navigationprovider is null Navigator.NavigationProvider.MoveTo throws error. Navigator.PlayerMover.MoveTowards thows an error also. Which is the proper way to navigate to a Vector3 location? Thanks.
Need to init them before use. Code: Navigator.PlayerMover = new SlideMover(); Navigator.NavigationProvider = new AStarNavigator(ProfileManager.CurrentProfile.graph); Right now you need to provide a graph object containing all the viable nodes that it can move between. We just entered closed alpha using the new mesh system.
Ok I see - Thanks for that. So I assume it creates the strongly typed nodes from the XML profiles. Thus we can programmatically create nodes and add them to the graph? ProfileManager.CurrentProfile.graph.AddNode(Me.x, Me.y, Me.z); (i know your not gonna add your own position, just for demonstration) SliderMover is not a recognized object- not in the RebornBuddy assembly? Not in the static navigator either... thoughts? Navigator.PlayerMover = new SlideMover(); Navigator.NavigationProvider = new AStarNavigator(ProfileManager.CurrentProfile.graph); Thank you for your assistance! Twist
Looks like its not set to public. Code: class SlideMover : IPlayerMover { public void MoveStop() { MovementManager.MoveForwardStop(); } public void MoveTowards(Vector3 location) { GameObjectManager.LocalPlayer.Face(location); MovementManager.MoveForwardStart(); } }
Providing SlideMover would resolve my thread as well: http://www.thebuddyforum.com/rebornbuddy-forum/community-developer-forum/151232-mount-facing.html
Error 4 No overload for method 'Face' takes 1 arguments Code: public class SlideMover : IPlayerMover { public void MoveStop() { MovementManager.MoveForwardStop(); } public void MoveTowards(Vector3 location) { GameObjectManager.LocalPlayer.Face(location); MovementManager.MoveForwardStart(); } } Looks like there is no overload to face...
Sorry, was in the wrong branch when I coped the code. Code: class SlideMover : IPlayerMover { public void MoveStop() { MovementManager.MoveForwardStop(); } public void MoveTowards(Vector3 location) { location.Face(); MovementManager.MoveForwardStart(); } }
Im thinking this... public void MoveTowards(Vector3 location) { Vector3 pixelpos = location; float rotation = (float)(Math.Atan2(pixelpos.Y, pixelpos.X) / (2 * Math.PI)); GameObjectManager.LocalPlayer.SetFacing(rotation); MovementManager.MoveForwardStart(); }
Ok got it all working! For the record Location.Face and MovementManager.SetFacing(floatvector); doesn't work when your mounted. Thank you for your help though! This project can now MoveTowards forward... hehe.
Well first up i have a patrol bot. That will wander around and kill mobs in an area. Without the use of profiles or anything else at all. You just start run the bot and press start. That one is already done - just waiting for a botbase category on the forums. Next up we have the HealBot which heals a group of people and follows the leader. Useful for dungeons leves/guildhests and whatnot or Heal-Slaving. This is the one i'm working on right now.