VintProg Posted July 6, 2010 Share 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. Link to comment
DiSaMe Posted July 6, 2010 Share Posted July 6, 2010 You need setPedControlState and some trigonometry. Link to comment
VintProg Posted July 6, 2010 Author Share Posted July 6, 2010 I it is necessary that actor walk on coordinates. Link to comment
VintProg Posted July 6, 2010 Author Share Posted July 6, 2010 Realy it is impossible such does? Link to comment
DiSaMe Posted July 6, 2010 Share Posted July 6, 2010 As I said, you need trigonometry. Calculate the angle and set it with setPedCameraRotation. Link to comment
VintProg Posted July 6, 2010 Author Share Posted July 6, 2010 So beside me version 1.0.4 Link to comment
dzek (varez) Posted July 6, 2010 Share 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 Link to comment
DiSaMe Posted July 6, 2010 Share 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. Link to comment
dzek (varez) Posted July 6, 2010 Share 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.. Link to comment
50p Posted July 6, 2010 Share 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. Link to comment
Slothman Posted July 8, 2010 Share 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. Link to comment
DiSaMe Posted July 8, 2010 Share 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. 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