CJmodder Posted May 29, 2021 Share Posted May 29, 2021 Hi everyone, I was playing around with a zombie script i found for SA, it works very well at spawning random (peds) as zombies, but i want to be able to choose which peds spawn. Does anybody know how to change the opcodes in a way so i can say choose 2 or 3 peds of choice to spawn? I would appreciate all the help! Here is the zombie script: //-------------MAIN--------------- 0000: NOP 060A: create_decision_maker_type 5 store_to [email protected] // decision\allowed\m_.ped files 0708: reset_decision_maker [email protected] event 31 0708: reset_decision_maker [email protected] event 36 0708: reset_decision_maker [email protected] event 9 0709: set_decision_maker [email protected] on_event 36 taskID 1000 respect 0.0 hate 100.0 like 0.0 dislike 0.0 in_car 1 on_foot 1 // see *.ped files 0709: set_decision_maker [email protected] on_event 9 taskID 1000 respect 0.0 hate 100.0 like 0.0 dislike 100.0 in_car 1 on_foot 1 // see *.ped files 0709: set_decision_maker [email protected] on_event 31 taskID 200 respect 100.0 hate 100.0 like 100.0 dislike 100.0 in_car 1 on_foot 1 // see *.ped files :NONAME_132 wait 0 01F0: set_max_wanted_level_to 0 01EB: set_traffic_density_multiplier_to 0.0 03DE: set_pedestrians_density_multiplier_to 0.0 0923: enable_air_traffic 0 06D7: enable_train_traffic 0 06D0: enable_emergency_traffic 0 if Player.Defined(0) else_jump @NONAME_545 [email protected] = 0 :NONAME_188 if [email protected]([email protected],12i) == 1 else_jump @NONAME_286 if or Actor.Dead([email protected]([email protected],12i)) 8104: not actor $PLAYER_ACTOR near_actor [email protected]([email protected],12i) radius 150.0 150.0 150.0 sphere 0 else_jump @NONAME_279 Actor.RemoveReferences([email protected]([email protected],12i)) [email protected]([email protected],12i) = 0 :NONAME_279 jump @NONAME_524 :NONAME_286 wait 0 0208: [email protected] = random_float_in_ranges -60.0 60.0 0208: [email protected] = random_float_in_ranges -60.0 60.0 04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset [email protected] [email protected] 0.0 092E: get_water_height_at [email protected] [email protected] ignore_waves 0 store_to [email protected] if and 80FE: not actor $PLAYER_ACTOR sphere 0 in_sphere [email protected] [email protected] [email protected] radius 10.0 10.0 10.0 80C2: not sphere_onscreen [email protected] [email protected] [email protected] radius 5.0 not [email protected] >= 0.0 else_jump @NONAME_433 jump @NONAME_440 :NONAME_433 jump @NONAME_286 :NONAME_440 0376: [email protected]([email protected],12i) = create_random_actor_at [email protected] [email protected] -100.0 gosub @NONAME_552 0489: set_actor [email protected]([email protected],12i) muted 1 060B: set_actor [email protected]([email protected],12i) decision_maker_to [email protected] 05E2: AS_actor [email protected]([email protected],12i) kill_actor $PLAYER_ACTOR [email protected]([email protected],12i) = 1 :NONAME_524 [email protected] += 1 [email protected] > 11 else_jump @NONAME_188 :NONAME_545 jump @NONAME_132 :NONAME_552 0209: [email protected] = random_int_in_ranges 0 3 if [email protected] == 0 else_jump @NONAME_603 Actor.SetWalkStyle([email protected]([email protected],12i), "OLDMAN") jump @NONAME_688 :NONAME_603 if [email protected] == 1 else_jump @NONAME_648 Actor.SetWalkStyle([email protected]([email protected],12i), "OLDFATMAN") jump @NONAME_688 :NONAME_648 if [email protected] == 2 else_jump @NONAME_688 Actor.SetWalkStyle([email protected]([email protected],12i), "OLDFATWOMAN") :NONAME_688 return Link to comment Share on other sites More sharing options...
ZAZ Posted May 31, 2021 Share Posted May 31, 2021 this script creates random actors by this opcode 0376: 1@(0@,12i) = create_random_actor_at 27@ 28@ -100.0 to determine ped models needs other codes, especially it needs to load model(s) Therefore you have to learn coding CJmodder 1 CLEO MODS CLEO Script Tutorial Link to comment Share on other sites More sharing options...
CJmodder Posted May 31, 2021 Author Share Posted May 31, 2021 30 minutes ago, ZAZ said: this script creates random actors by this opcode 0376: 1@(0@,12i) = create_random_actor_at 27@ 28@ -100.0 to determine ped models needs other codes, especially it needs to load model(s) Therefore you have to learn coding You put me on the right track, i looked into it and saw that i had to replace the opcodes you highlighted with '009A: [email protected]([email protected],12i) = create_actor_pedtype 4 model 195 at [email protected] [email protected] -100.0' and put Model.Load(195) at the top. It works perfectly now, thanks a lot Zaz! Link to comment Share on other sites More sharing options...
CJmodder Posted June 1, 2021 Author Share Posted June 1, 2021 23 hours ago, ZAZ said: this script creates random actors by this opcode 0376: 1@(0@,12i) = create_random_actor_at 27@ 28@ -100.0 to determine ped models needs other codes, especially it needs to load model(s) Therefore you have to learn coding Hello Zaz, I'm sorry for bothering you, but i have a question. I am able to choose which ped spawns and attacks the player, i figured out how to load them, all no problem. But what if i wanted to spawn 2 peds to attack the player. Is there a way to make the script pick two or more peds to spawn? I tried all kinds of things, but i can't figure it out. Link to comment Share on other sites More sharing options...
breant55 Posted June 1, 2021 Share Posted June 1, 2021 Hello Zaz Sir i face one problem Sir can you suggest me how to solve ...Sir in 3ds max i was apply vent smoke but its flow wrong side i wanna rotate smoke flow...while apply in 3ds max sir how i fix this please Suggest. Hello Zaz Sir i face one problem Sir can you suggest me how to solve ...Sir in 3ds max i was apply vent smoke but its flow wrong side i wanna rotate smoke flow...while apply in 3ds max sir how i fix this please Suggest. Link to comment Share on other sites More sharing options...
SmolDawn571 Posted January 7, 2022 Share Posted January 7, 2022 (edited) I'm also modifying a zombie mod made by someone and see these numbers. What do these numbers mean? Spoiler 05E2: AS_actor [email protected]([email protected],16i) kill_actor $PLAYER_ACTOR (the [email protected] [email protected] and 16i) I mean how do you set this to all peds? I want to make every peds attack me because some of the peds doesn't seem to attack me while using this mod Edited January 7, 2022 by SmolDawn571 Link to comment Share on other sites More sharing options...