kal-el5676 Posted August 15, 2010 Share Posted August 15, 2010 Yo guys. I just want to spawn a ped at my coods, i want it to walk around aimlessly, i want to be able to choose whether it's aggressive or not, and i want to repeat this several times for many peds. No weapons. Please help! Thanks! Link to comment Share on other sites More sharing options...
Jerry123 Posted August 15, 2010 Share Posted August 15, 2010 ? Link to comment Share on other sites More sharing options...
kal-el5676 Posted August 15, 2010 Author Share Posted August 15, 2010 I need the code, duh. Link to comment Share on other sites More sharing options...
Jerry123 Posted August 15, 2010 Share Posted August 15, 2010 I need the code, duh. So you want a code that spawns a ped on your coords and can set its behavior(pedtype?)? Link to comment Share on other sites More sharing options...
kal-el5676 Posted August 15, 2010 Author Share Posted August 15, 2010 (edited) Well, yes, but i have tried using different ped types and the ped continues to just stand there. i tried using ped type 7 or whatever the ballas is to make it aggressive and no luck. i am using a stripped scm. dunno if that matters. Oh, and like i said i want it to walk around, not just stand there. Edited August 15, 2010 by kal-el5676 Link to comment Share on other sites More sharing options...
Jerry123 Posted August 15, 2010 Share Posted August 15, 2010 Well, yes, but i have tried using different ped types and the ped continues to just stand there. i tried using ped type 7 or whatever the ballas is to make it aggressive and no luck. i am using a stripped scm. dunno if that matters. Oh, and like i said i want it to walk around, not just stand there. Remove the Actor References with Actor.RemoveReferences and he will walk around but he can disapear! Just set his pedtype to 23 and then use 077A on all pedtypes you want Link to comment Share on other sites More sharing options...
kal-el5676 Posted August 15, 2010 Author Share Posted August 15, 2010 Ok, your gonna have to level with me. i suck at coding. Which is the remove references opcode? where do i put it? and please explain the 077A thing. The code i'm using: {$CLEO .cs}//-------------MAIN---------------thread 'DINOS'0A95: enable_thread_saving:Threadwait 0Model.Load(#FAM3)ifModel.Available(#FAM3)jf @Thread009A: [email protected] = create_actor_pedtype 23 model #FAM3 at 2.0 0.0 0.00A93: end_custom_thread Link to comment Share on other sites More sharing options...
Jerry123 Posted August 15, 2010 Share Posted August 15, 2010 Ok, your gonna have to level with me. i suck at coding. Which is the remove references opcode? where do i put it? and please explain the 077A thing. The code i'm using: {$CLEO .cs}//-------------MAIN---------------thread 'DINOS'0A95: enable_thread_saving:Threadwait 0Model.Load(#FAM3)ifModel.Available(#FAM3)jf @Thread009A: [email protected] = create_actor_pedtype 23 model #FAM3 at 2.0 0.0 0.00A93: end_custom_thread {$CLEO .cs}//-------------MAIN---------------//You dont need this lolthread 'DINOS'//0A95: enable_thread_saving you don't need this!:IFwait 0if00E1: player 0 pressed_key 8jf @IF04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 5.0 :Threadwait 0Model.Load(#FAM3):Checkwait 0ifModel.Available(#FAM3)jf @Check009A: [email protected] = create_actor_pedtype 23 model #FAM3 at [email protected] [email protected] [email protected]: set_actor [email protected] acquaintance 4 to_actors_pedtype 6 // Sets the Actor to make him aggresive to Pedtype 6(Cops)Actor.RemoveReferences([email protected])Model.Destroy(#FAM3)0A93: end_custom_thread The Code starts when you press G then the Actor you use will spawn before you! Link to comment Share on other sites More sharing options...
kal-el5676 Posted August 15, 2010 Author Share Posted August 15, 2010 Appreciate it, but i want it to spawn always, not with a prompt. also, he is not aggressive. I want to use this for multiple actors, so i need it to be repeated as well. Link to comment Share on other sites More sharing options...
kal-el5676 Posted August 29, 2010 Author Share Posted August 29, 2010 (edited) WILL SOMEONE PLEASE HELP ME? I realise it's a dumb question, but i'm not a coder. I'm sitting here pulling my hair out trying to get this to work. I cant spawn a ped via 2dfx cuz it's always the wrong ones. i cant set the id numbers. i can spawn a ped but it just stands there. i want to, set it to aggressive or not, and have it walk around randomly. no hit this button, just spawn all the time. i know this is simple which is why it's driving me bonkers!!! someone PLEASE help! And i have searched EVERYWHERE so please don't say that. Edited August 29, 2010 by kal-el5676 Link to comment Share on other sites More sharing options...
BnB Posted August 30, 2010 Share Posted August 30, 2010 {$CLEO}thread 'DINOS':IFwait 0if00E1: player 0 pressed_key 8jf @IF04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 0.0 0.0 5.0:Threadwait 0Model.Load(#FAM3):Checkwait 0ifModel.Available(#FAM3)jf @Check009A: [email protected] = create_actor_pedtype 7 model #FAM3 at [email protected] [email protected] [email protected]: AS_actor [email protected] kill_actor $PLAYER_ACTORwait 200 msjump @IF Link to comment Share on other sites More sharing options...
kal-el5676 Posted August 30, 2010 Author Share Posted August 30, 2010 (edited) Is this done with a prompt? i appreciate it but i want it to spawn all the time not by pressing a button. also i want it repeated numerous times at multiple coords. i don't want it to appear in front of me everytime. please read the thread next time. Edited August 30, 2010 by kal-el5676 Link to comment Share on other sites More sharing options...
MDXNaTioN Posted November 5, 2020 Share Posted November 5, 2020 00AF: set_car [email protected] driver_behaviour_to 4 00AE: set_car [email protected] traffic_behaviour_to 2 how to edit behavior for bike not like above. in above may cause crash at shooting peds to fall Link to comment Share on other sites More sharing options...
Strs Posted February 28, 2021 Share Posted February 28, 2021 {$Cleo} 0000: while true 01F5: [email protected] = get_player_actor 0 0208: [email protected] = random_float_in_ranges 30.0 -30.0 0208: [email protected] = random_float_in_ranges 30.0 -30.0 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor [email protected] with_offset [email protected] [email protected] 0.0 02C0: store_to [email protected] [email protected] [email protected] ped_path_coords_closest_to [email protected] [email protected] [email protected] 0376: [email protected] = create_random_actor_at [email protected] [email protected] [email protected] 060B: set_actor [email protected] decision_maker_to 1 //check below set 0 to 6 you liking 05DE: AS_actor [email protected] walk_around_ped_path 0187: [email protected] = create_marker_above_actor [email protected] //this marker just to show ped where they spawn you can remove it wait 1000 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian end { 060B: set_actor [email protected] decision_maker_to 1 Decision Maker 0 - the behavior of the actor in the group Decision Maker 1 - Model behavior Decision Maker 2 - the usual model Decision Maker 3 - brave behavior Decision Maker 4 - cowardly behavior Decision Maker 5 - Fire behavior Decision Maker 6 - train driver (?) } remember this peds spawn only if there is peds path (where you see a lot peds walking) why ? because no sense at all they even spawn in water ? or you fly that's why interior they wont spawn AlbertWesker 1 Link to comment Share on other sites More sharing options...
AlbertWesker Posted July 10 Share Posted July 10 On 2/28/2021 at 2:04 PM, Strs said: {$Cleo} 0000: while true 01F5: [email protected] = get_player_actor 0 0208: [email protected] = random_float_in_ranges 30.0 -30.0 0208: [email protected] = random_float_in_ranges 30.0 -30.0 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor [email protected] with_offset [email protected] [email protected] 0.0 02C0: store_to [email protected] [email protected] [email protected] ped_path_coords_closest_to [email protected] [email protected] [email protected] 0376: [email protected] = create_random_actor_at [email protected] [email protected] [email protected] 060B: set_actor [email protected] decision_maker_to 1 //check below set 0 to 6 you liking 05DE: AS_actor [email protected] walk_around_ped_path 0187: [email protected] = create_marker_above_actor [email protected] //this marker just to show ped where they spawn you can remove it wait 1000 01C2: remove_references_to_actor [email protected] // Like turning an actor into a random pedestrian end { 060B: set_actor [email protected] decision_maker_to 1 Decision Maker 0 - the behavior of the actor in the group Decision Maker 1 - Model behavior Decision Maker 2 - the usual model Decision Maker 3 - brave behavior Decision Maker 4 - cowardly behavior Decision Maker 5 - Fire behavior Decision Maker 6 - train driver (?) } remember this peds spawn only if there is peds path (where you see a lot peds walking) why ? because no sense at all they even spawn in water ? or you fly that's why interior they wont spawn This is awesome. Do you by chance know how I can make the peds kill the player and what opcode to use in this script? Because I added 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR and it doesn't seem to work. Any help would be appreciated. Link to comment Share on other sites More sharing options...
Strs Posted July 11 Share Posted July 11 (edited) your ped which should kill player 0747: clear_acquaintance 0 of_actors_pedtype [email protected] to_actors_pedtype 0 //0 to remove if this pedtype respect pedtype 0 which is player pedtype 0747: clear_acquaintance 1 of_actors_pedtype [email protected] to_actors_pedtype 0 //1 to remove if this pedtype Likes pedtype 0 which is player pedtype then you add this to hate player 077B: clear_actor [email protected] acquaintance 4 to_actors_pedtype 0 //4 is hate most badly to pedtype 0 player type your ped which should kill player 0747: clear_acquaintance 0 of_actors_pedtype [email protected] to_actors_pedtype 0 //0 to remove if this pedtype respect pedtype 0 which is player pedtype 0747: clear_acquaintance 1 of_actors_pedtype [email protected] to_actors_pedtype 0 //1 to remove if this pedtype Likes pedtype 0 which is player pedtype then you add this to hate player 077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 0 //4 is hate most badly to pedtype 0 player type this is ok but after re start game after you save then it works 0746: set_acquaintance 4 of_actors_pedtype 23 to_actors_pedtype 0 //pedtype 23 is your ped type if you use as balas you use 7 if you want instant effect you use this 077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 0 Edited July 11 by Strs i forgot Link to comment Share on other sites More sharing options...
AlbertWesker Posted July 11 Share Posted July 11 6 hours ago, Strs said: Thanks for your reply, your help is much appreciated. I have been playing around with your code, but I can't seem to get it working the way i had in mind. It does make the peds attack me. but for some reason they run away when I fight back. I'm actually trying to make them behave like zombies. I'm trying to spawn in about 14 peds that I can choose, like fam1, fam2, fam3 etc. that attack the player, and the moment the ped dies, they respawn again. Similair to the VC mod in this video at 2:45. But i'm trying to make it for SA off course. You got any tips for me? Link to comment Share on other sites More sharing options...
ZAZ Posted July 11 Share Posted July 11 19 hours ago, AlbertWesker said: Because I added 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR and it doesn't seem to work. Any help would be appreciated. opcode 05E2: should work but i assume the construct of your script is bad or you gave a new task to the actor so same advice as always: please post your script AlbertWesker 1 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
Strs Posted July 11 Share Posted July 11 (edited) just use enemy zombies pedtype to 23 (special) or 7 (Ballas) or 9 (Vagos) they hate badly player and yea you can choose any skin but what matters is pedtype never use families pedtype 8 for enemy they run away most of time they dont attack back and if you look above i give this { 060B: set_actor [email protected] decision_maker_to 1 Decision Maker 0 - the behavior of the actor in the group Decision Maker 1 - Model behavior Decision Maker 2 - the usual model Decision Maker 3 - brave behavior Decision Maker 4 - cowardly behavior Decision Maker 5 - Fire behavior Decision Maker 6 - train driver (?) } you can use this Decision Maker 3 - brave behavior or this Decision Maker 0 - the behavior of the actor in the group other ped run from players and if possible take a look in some zombies mods how they done so some idea you can get Edited July 11 by Strs hmm AlbertWesker 1 Link to comment Share on other sites More sharing options...
AlbertWesker Posted July 11 Share Posted July 11 2 hours ago, Strs said: just use enemy zombies pedtype to 23 (special) or 7 (Ballas) or 9 (Vagos) they hate badly player and yea you can choose any skin but what matters is pedtype never use families pedtype 8 for enemy they run away most of time they dont attack back and if you look above i give this { 060B: set_actor [email protected] decision_maker_to 1 Decision Maker 0 - the behavior of the actor in the group Decision Maker 1 - Model behavior Decision Maker 2 - the usual model Decision Maker 3 - brave behavior Decision Maker 4 - cowardly behavior Decision Maker 5 - Fire behavior Decision Maker 6 - train driver (?) } you can use this Decision Maker 3 - brave behavior or this Decision Maker 0 - the behavior of the actor in the group other ped run from players and if possible take a look in some zombies mods how they done so some idea you can get Thanks for your insight. I'm gonna try to figure it out! Link to comment Share on other sites More sharing options...
AlbertWesker Posted July 11 Share Posted July 11 Okay, so I've been trying some things out and have been reading alot and compared to other zombie scripts, and now i'm able to actually spawn in the actor and make him kill the player. Thanks Strs, because you brought me on the right track. The only things I haven't figured out yet are respawing the actor when he's dead, so he's like a returning zombie, Right now the actor doesn't respawn after being killed. I'm still figuring how to make the script spawn 14 or so peds with models I choose. As for ZAZ, this is the script i'm working with right now. :ZOMBIE script_name 'ZOMBIE' 06D7: enable_train_traffic 0 06D0: enable_emergency_traffic 0 01EB: set_traffic_density_multiplier_to 0.0 03DE: set_pedestrians_density_multiplier_to 0.0 0923: enable_air_traffic 0 0000: while true 01F5: [email protected] = get_player_actor 0 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor [email protected] with_offset [email protected] [email protected] 0.0 02C0: store_to [email protected] [email protected] [email protected] ped_path_coords_closest_to [email protected] [email protected] [email protected] 0376: [email protected] = create_random_actor_at [email protected] [email protected] [email protected] 060B: set_actor [email protected] decision_maker_to 65536 05DE: AS_actor [email protected] walk_around_ped_path 0489: set_actor [email protected] muted 1 0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 1 Actor.SetWalkStyle([email protected], "OLDMAN") 03FE: set_actor [email protected] money 0 0332: set_actor [email protected] bleeding 1 wait 1000 01C2: remove_references_to_actor [email protected] jump @ZOMBIE1 :ZOMBIE1 077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 0 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR jump @ZOMBIE2 :ZOMBIE2 wait 0 if Actor.Dead([email protected]) jump @ZOMBIE1 terminate_this_script Link to comment Share on other sites More sharing options...
ZAZ Posted July 12 Share Posted July 12 as i thought, here's the main problem 01C2: remove_references_to_actor 0@ jump @ZOMBIE1 :ZOMBIE1 077A: set_actor 0@ acquaintance 4 to_actors_pedtype 0 05E2: AS_actor 0@ kill_actor $PLAYER_ACTOR 01C2: remove_references_to_actor 0@ <--- this code release the actor instance [email protected], so he didn't exist anymore for the script so these codes don't work because references_to_actor [email protected] was already removed 077A: set_actor [email protected] acquaintance 4 to_actors_pedtype 0 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR Furthermore, after creating the actor and giving behaviour, it needs to keep the code looping, and let it run through some conditional checks while looping, checking if player_char is still present, checking if the actor is not dead, checking if the actor is not far away. If actor is dead or far way, THEN REMOVE REFERENCE TO ACTOR (opcode 01C2:) and then script can restart and spawn again the actor I wrote the script in high level syntax Recompile the script, then you can see it in classical low level syntax We recommand to learn high level, read this tutorial {$CLEO .cs} script_name 'ZOMBIE' 06D7: enable_train_traffic 0 06D0: enable_emergency_traffic 0 01EB: set_traffic_density_multiplier_to 0.0 03DE: set_pedestrians_density_multiplier_to 0.0 0923: enable_air_traffic 0 while true wait 0 if 0256: player $PLAYER_CHAR defined then 01F5: 0@ = get_player_actor 0 0208: 1@ = random_float_in_ranges 30.0 -30.0 0208: 2@ = random_float_in_ranges 30.0 -30.0 04C4: store_coords_to 0@ 1@ 2@ from_actor 0@ with_offset 1@ 2@ 0.0 02C0: store_to 0@ 1@ 2@ ped_path_coords_closest_to 0@ 1@ 2@ 0376: 0@ = create_random_actor_at 0@ 1@ 2@ 060B: set_actor 0@ decision_maker_to 65536 05DE: AS_actor 0@ walk_around_ped_path 0489: set_actor 0@ muted 1 0946: set_actor 0@ actions_uninterupted_by_weapon_fire 1 Actor.SetWalkStyle(0@, "OLDMAN") 03FE: set_actor 0@ money 0 0332: set_actor 0@ bleeding 1 //077A: set_actor 0@ acquaintance 4 to_actors_pedtype 0 05E2: AS_actor 0@ kill_actor $PLAYER_ACTOR while 0256: player $PLAYER_CHAR defined wait 0 if not Actor.Dead(0@) then if 80F2: not actor 0@ near_actor $PLAYER_ACTOR radius 120.0 120.0 sphere 0 then break end else break end end 01C2: remove_references_to_actor 0@ end end AlbertWesker 1 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
AlbertWesker Posted July 13 Share Posted July 13 Thanks ZAZ, you truly are a lifesaver, the script works perfectly now, I appreciate you taking the time to help me out . I'm also gonna take my time and read the tutorial since I've got a lot to learn when it comes to syntaxes, my coding skills are pretty basic at this point. 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