PalmBeachGames Posted January 16, 2015 Share Posted January 16, 2015 Hi, I'm having some trouble spawning bots with Slothbot onto a correct ground plane. My code originally gets an offset from a random player and creates a collision test zone, where when the player gets in the zone it gets his or her Z position and spawns the Slothbot. Unfortunately this does not work efficient as the player may be on a hill or below the Slothbot's X and Y ground position. When the bot is below the new Z position he falls and is re-spawned back to Z level, by game default, where he is then forgotten by the code; you can shoot but we will not die. I was hoping to learn how to use the Ped Paths so that I may implement that into my code, an example code may help. Link to comment
pa3ck Posted January 16, 2015 Share Posted January 16, 2015 https://wiki.multitheftauto.com/wiki/ProcessLineOfSight It gives you the positions, material etc. where it hits the ground. Second example comes handy in your situation. Link to comment
PalmBeachGames Posted January 16, 2015 Author Share Posted January 16, 2015 It wasn't an example, just a bug the method causes. Thanks for your response, in fact I just got the ground position via client and sent it over to the server side, it's not what I prefer but it's what we'll have to do until there is a better method. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now