What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Which is proper player mover?

Twist

Community Developer
Joined
Oct 15, 2010
Messages
643
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.
 
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
 
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();
        }
    }
 
Excellent Sir. I will try this now. Thank you for sharing!
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...
 
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();
}
 
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();
        }
    }
Oh thats much better. And doesnt require me to do math. Thank you sir.
 
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.
 
I'm really interested in what you're making. :P
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.
 
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.

Post it in the plugin sections.
 
Back
Top