VintProg Posted July 6, 2010 Posted July 6, 2010 Created actor: ped1 = createPed ( 120, 1959.55, -1714.46, 20) As his(its) force to go on coordinates; Here is opcode for scm (from INI): 07CD=6,AS_actor %1d% walk_to %2d% %3d% %4d% stop_with_angle %5d% within_radius %6d% The Boys help please.
VintProg Posted July 6, 2010 Author Posted July 6, 2010 I it is necessary that actor walk on coordinates.
DiSaMe Posted July 6, 2010 Posted July 6, 2010 As I said, you need trigonometry. Calculate the angle and set it with setPedCameraRotation. -
dzek (varez) Posted July 6, 2010 Posted July 6, 2010 do not use "setPedControlState" for making peds walk! they will not walk in right direction - it depends some way on local player rotation and keypress i think.. anyway - its buggy you have to use setPedAnimation Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
DiSaMe Posted July 6, 2010 Posted July 6, 2010 Really? It has always worked fine for me. In video peds use getPedCameraRotation and setPedControlState to walk. They follow path nodes with no problems. -
dzek (varez) Posted July 6, 2010 Posted July 6, 2010 rly.. when i was scriptign peds for 1st time i tried to use setPedControllState - but it failed (as descripted above) - then i changed to animations - then i saw that zombies resource is also using this method - and somewhere on forums somebody was complaing about setPedControlState on peds too.. Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
50p Posted July 6, 2010 Posted July 6, 2010 This is what I made in Nov 29 2008 with setPedControlState: It was before MTA 1.0. If you calculate the walk angle for peds correctly then you are fine. - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
Slothman Posted July 8, 2010 Posted July 8, 2010 there are quite a few problems when using control state, it works, but you have to set the angle and the controlstate clientside to avoid the problem of the zombie going off in its own direction. my Slothbot ai script uses control states. the only reason i use animations with zombies is to get the speed and look of a zombie. 50p's script with the peds that follow you works well because its done onclientredender, so the peds dont have a chance to turn away. Check out my recent work: ZDay - a zombie script Slothbot - an AI deathmatch bot my community profile (all my resources)
DiSaMe Posted July 8, 2010 Posted July 8, 2010 So you can set destination coordinates serverside and use them clientside. Then every client will control the ped separately, but the results will be the same. Peds work in this way in the video I posted. -
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