ShadowCoderKing Posted July 5, 2009 Share Posted July 5, 2009 hello can someone please tell me how to get a ped to walk or run to certain points in cleo Link to comment Share on other sites More sharing options...
Dutchy3010 Posted July 5, 2009 Share Posted July 5, 2009 First you have to get a handle (variable) of a pedestrian. 0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to [email protected] closest_ped_to [email protected] or 089E: get_actor_in_sphere [email protected] [email protected] [email protected] radius 5.0 handle_as [email protected] // versionB (For this last opcode you first need to check the player coords with 00A0) Then for the running/walking: 05F5: AS_actor [email protected] goto_point 2516.686 -1675.861 13.1227 mode 4 5500 ms // versionB The handle has to be the handle you got from the first opcodes. The point is the point you want. The mode is walking/running, I believe you need 4 and 6. Just test this. When you finished with a ped, just use: 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian Then it will become a random ped again. DYOM - Create, play, share! Link to comment Share on other sites More sharing options...
ShadowCoderKing Posted July 5, 2009 Author Share Posted July 5, 2009 thanks very much dutchy Link to comment Share on other sites More sharing options...
ShadowCoderKing Posted July 7, 2009 Author Share Posted July 7, 2009 once i get the actor to go to the first point he stops there and wont go to another one please help i am using 05F5: AS_actor [email protected] goto_point 2223.5566 -1642.454 15.4587 mode 6 7000 ms // versionB Link to comment Share on other sites More sharing options...
ZAZ Posted July 7, 2009 Share Posted July 7, 2009 once i get the actor to go to the first point he stops there and wont go to another one please help i am using 05F5: AS_actor [email protected] goto_point 2223.5566 -1642.454 15.4587 mode 6 7000 ms // versionB If I put bread and cheese on to the table I have also no sandwich I must put the cheese on to the bread and only if I eat it then I have good effect same with your code if you write here 05F5: AS_actor [email protected] goto_point 2223.5566 -1642.454 15.4587 mode 6 7000 ms nothing happens sorry for irony but without context nobody can help CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
ShadowCoderKing Posted July 7, 2009 Author Share Posted July 7, 2009 here is my script {$CLEO .cs}:Actor_103A4: name_thread 'Actor':Actor_20001: wait 0 ms00D6: if 00256: player $PLAYER_CHAR defined004D: jump_if_false @Actor_200D6: if 000FF: actor $PLAYER_ACTOR 1 (in-sphere)near_point_on_foot 2223.5566 -1642.454 15.4587 radius 2.0 2.0 2.0 004D: jump_if_false @Actor_20247: request_model 120:Load_models_check0001: wait 0 ms00D6: if and0248: model 120 available 004D: jump_if_false @Load_models_check009A: [email protected] = create_actor 24 120 at 2236.9417 -1610.0242 16.45610173: set_actor [email protected] z_angle_to 156.9815 02E2: set_actor [email protected] weapon_accuracy_to 1000446: set_actor [email protected] immune_to_headshots 00223: set_actor [email protected] health_to 4000//05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR:walkpoint05F5: AS_actor [email protected] goto_point 2223.5566 -1642.454 15.4587 mode 6 7000 ms // versionB 05F5: AS_actor [email protected] goto_point 2223.5566 -1642.454 15.4587 mode 6 7000 ms // versionB :Loop_10001: wait 0 ms00D6: if 08118: NOT actor [email protected] dead004D: jump_if_false @Cleanup_100D6: if 00104: actor $PLAYER_ACTOR near_actor [email protected] radius 80.0 80.0 10.0 sphere 0004D: jump_if_false @Cleanup_10002: jump @Loop_1:Cleanup_101C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian0002: jump @Actor_2 Link to comment Share on other sites More sharing options...
ZAZ Posted July 7, 2009 Share Posted July 7, 2009 (edited) the actors walks on paths and must first go to a path before they go to a destination, same for cars (ped paths and car paths are stored in the nodesX.dat in gta3.img) the opcode to define scm paths let the actor go everywhere :walkpoint//05F5: AS_actor [email protected] goto_point 2223.5566 -1642.454 15.4587 mode 6 7000 ms // versionB//05F5: AS_actor [email protected] goto_point 2223.5566 -1642.454 15.4587 mode 6 7000 ms // versionB 05D6: clear_scmpath05D7: add_point_to_scmpath 2224.1702 -1640.783 15.44605D8: AS_assign_scmpath to_actor [email protected] flags 6 1 forthermore can be use AS-packs to define more scm_paths 0615: define_AS_pack_begin [email protected] 05D6: clear_scmpath 05D7: add_point_to_scmpath 2224.1702 -1640.783 15.44605D7: add_point_to_scmpath 2227.342 -1628.7476 15.5823 05D7: add_point_to_scmpath 2232.9329 -1625.8437 15.493105D8: AS_assign_scmpath to_actor -1 flags 6 3 0616: define_AS_pack_end [email protected] 0618: assign_actor [email protected] to_AS_pack [email protected] AS_pack opcodes are used like container or brackets (clear task scmpath1 x y z scmpath2 x y z scmpath3 x y z) actor [email protected] do () last parameter of 05D8: AS_assign_scmpath to_actor -1 flags 6 3 gives the amount of scmpaths opcode 0643: let the AS_pack repeat allways 0643: set_AS_pack [email protected] loop 1 opcode 061B: disable the AS_pack but for one time will it work 061B: remove_references_to_AS_pack [email protected] can be set directly after the AS_pack Edited July 7, 2009 by ZAZ CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Deji Posted July 7, 2009 Share Posted July 7, 2009 here is my script :walkpoint05F5: AS_actor [email protected] goto_point 2223.5566 -1642.454 15.4587 mode 6 7000 ms // versionB 05F5: AS_actor [email protected] goto_point 2223.5566 -1642.454 15.4587 mode 6 7000 ms // versionB They're both at the same coordinate... Link to comment Share on other sites More sharing options...
ShadowCoderKing Posted July 7, 2009 Author Share Posted July 7, 2009 thank you zaz Link to comment Share on other sites More sharing options...
ShadowCoderKing Posted July 7, 2009 Author Share Posted July 7, 2009 here is my script :walkpoint05F5: AS_actor [email protected] goto_point 2223.5566 -1642.454 15.4587 mode 6 7000 ms // versionB 05F5: AS_actor [email protected] goto_point 2223.5566 -1642.454 15.4587 mode 6 7000 ms // versionB They're both at the same coordinate... yes i know but is just an example Link to comment Share on other sites More sharing options...
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