Xeno Posted March 1, 2010 Share Posted March 1, 2010 Hey guys, I was wondering if it was possible to create a ped that follows you around, a bit like a body guard. If so how, i would proberly get as far as this . function pedLoad() ped1 = createPed ( 287, 223, 1875, 18 ) giveWeapon( ped1, 31, 500, true ) setTimer( giveWeapon, 1000, 1, ped1, 31, 500, true) end addEventHandler ( "onResourceStart", getRootElement(), pedLoad ) Link to comment
Slothman Posted March 1, 2010 Share Posted March 1, 2010 so you created a ped, now you gotta move it. you need to calculate the angle you need it to turn, you can make it move forward with setcontrolstate or setting an animation. Link to comment
Xeno Posted March 1, 2010 Author Share Posted March 1, 2010 No, not like that. like the ped follows you everywhere Link to comment
dzek (varez) Posted March 1, 2010 Share Posted March 1, 2010 you cannot create bot if you asking about that if you want THINKING bot, you will need A LOT of time spend on scripting, and the script will be HUGE Link to comment
Xeno Posted March 1, 2010 Author Share Posted March 1, 2010 So wat if it was like the cheat on the real game when all the peds follow you? Link to comment
dzek (varez) Posted March 1, 2010 Share Posted March 1, 2010 you cannot trigger singleplayer cheats in mta Link to comment
robhol Posted March 1, 2010 Share Posted March 1, 2010 you cannot trigger singleplayer cheats in mta That's not what he asked either, (and by the way, yes you can, but only a few) maybe you should read a bit more carefully. The thing about peds is, they're somewhat difficult to control since you can only set individual controls on or off. Maybe someone could create a "control library" for peds with functions like "goTowardsPoint" or something, but until then you're stuck doing it this way. Link to comment
50p Posted March 1, 2010 Share Posted March 1, 2010 @tomdrum11, I made peds example script awhile ago (when MTA was out in nightly builds before 1.x). You can have a look at it, https://community.multitheftauto.com/index.php?p= ... ils&id=234 It's nothing fancy just peds that follow you, that was a purpose of the script. You can give them weapons but they won't use it. Link to comment
Xeno Posted March 2, 2010 Author Share Posted March 2, 2010 Thank you very much, i saw the video on you tube and that gave me an idea of an admin body guard (which im makeing now) and i will be sure to mention that you helped me. Thanks Link to comment
Slothman Posted March 4, 2010 Share Posted March 4, 2010 keep in mind also that the script he wrote is clientside only, and won't sync with other players. I am also currently working on a bot designed for teamplay, its a lot of work not only making them smart, but making sure that they are sycned effectively. 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