Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

Cleo script confusion.


deleted account
 Share

Recommended Posts

deleted account

I'm trying to tweak the Dr Salvador mod for the Cleo Myths series and the mod pack, I want to have the fight work in a sort of wave, the player kills the first group of Ganado's and then the next group appears and then the last group. Thing is though the 2nd wave of Ganado's spawn after only killing just 1 of the enemies, how do I fix this?

// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013{$CLEO .cs}//-------------MAIN---------------thread 'SALVAMOR_THREAD' :SALVAMOR_THREAD_19wait 0 if    Player.Defined($PLAYER_CHAR)else_jump @SALVAMOR_THREAD_19 if   $ONMISSION == 0 else_jump @SALVAMOR_THREAD_19 if 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -510.8075 -87.0016 62.1429 radius 100.5 100.5 50.5 else_jump @SALVAMOR_THREAD_19 if and00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes   [email protected] >= 5   17 > [email protected] else_jump @SALVAMOR_THREAD_145 jump @SALVAMOR_THREAD_19 :SALVAMOR_THREAD_145Model.Load(#CHNSAW)Model.Load(#GRENADE)Model.Load(#SHOVEL)Model.Load(#GUN_CANE)023C: load_special_actor 'DRSAL' as 6 // models 290-299 038B: load_requested_models :SALVAMOR_THREAD_180wait 0 if 023D:   special_actor 6 loaded else_jump @SALVAMOR_THREAD_180 [email protected] = Actor.Create(Mission1, #SPECIAL06, -489.3709, -181.6115, 78.2109)Actor.Angle([email protected]) = 99.2446Actor.Health([email protected]) = 2500Actor.AddArmour([email protected], 0)060B: set_actor [email protected] decision_maker_to 32 0446: set_actor [email protected] dismemberment_possible 0 04D8: set_actor [email protected] drowns_in_water 0 Actor.GiveWeaponAndAmmo([email protected], Chainsaw, 1)0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 0 [email protected] = Actor.Create(Mission1, #SPECIAL06, -501.5675, -205.2137, 78.4062)Actor.Angle([email protected]) = 89.2179Actor.Health([email protected]) = 2500Actor.AddArmour([email protected], 0)060B: set_actor [email protected] decision_maker_to 32 0446: set_actor [email protected] dismemberment_possible 0 04D8: set_actor [email protected] drowns_in_water 0 Actor.GiveWeaponAndAmmo([email protected], Cane, 1)0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 0 [email protected] = Actor.Create(Mission1, #SPECIAL06, -522.149, -180.8624, 78.1542)Actor.Angle([email protected]) = 89.2179Actor.Health([email protected]) = 2500Actor.AddArmour([email protected], 0)060B: set_actor [email protected] decision_maker_to 32 0446: set_actor [email protected] dismemberment_possible 0 04D8: set_actor [email protected] drowns_in_water 0 Actor.GiveWeaponAndAmmo([email protected], Chainsaw, 1)0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 0 [email protected] = Actor.Create(Mission1, #SPECIAL06, -534.3264, -103.8466, 63.2969)Actor.Angle([email protected]) = 89.2179Actor.Health([email protected]) = 2500Actor.AddArmour([email protected], 0)060B: set_actor [email protected] decision_maker_to 32 0446: set_actor [email protected] dismemberment_possible 0 04D8: set_actor [email protected] drowns_in_water 0 Actor.GiveWeaponAndAmmo([email protected], Shovel, 1)0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 0 [email protected] = Actor.Create(Mission1, #SPECIAL06, -504.2966, -199.0341, 78.4062)Actor.Angle([email protected]) = 89.2179Actor.Health([email protected]) = 2500Actor.AddArmour([email protected], 0)060B: set_actor [email protected] decision_maker_to 32 0446: set_actor [email protected] dismemberment_possible 0 04D8: set_actor [email protected] drowns_in_water 0 Actor.GiveWeaponAndAmmo([email protected], Cane, 1)0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 0wait 3000 [email protected] = Actor.Create(Mission1, #SPECIAL06, -537.7304, -98.7789, 63.2969)Actor.Angle([email protected]) = 99.2446Actor.Health([email protected]) = 2500Actor.AddArmour([email protected], 0)060B: set_actor [email protected] decision_maker_to 32 0446: set_actor [email protected] dismemberment_possible 0 04D8: set_actor [email protected] drowns_in_water 0 Actor.GiveWeaponAndAmmo([email protected], Shovel, 1)0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 0 [email protected] = Actor.Create(Mission1, #SPECIAL06, -529.8821, -100.2222, 63.2969)Actor.Angle([email protected]) = 89.2179Actor.Health([email protected]) = 2500Actor.AddArmour([email protected], 0)060B: set_actor [email protected] decision_maker_to 32 0446: set_actor [email protected] dismemberment_possible 0 04D8: set_actor [email protected] drowns_in_water 0 Actor.GiveWeaponAndAmmo([email protected], Cane, 1)0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 0 [email protected] = Actor.Create(Mission1, #SPECIAL06, -526.6510, -102.7788, 63.2969)Actor.Angle([email protected]) = 89.2179Actor.Health([email protected]) = 2500Actor.AddArmour([email protected], 0)060B: set_actor [email protected] decision_maker_to 32 0446: set_actor [email protected] dismemberment_possible 0 04D8: set_actor [email protected] drowns_in_water 0 Actor.GiveWeaponAndAmmo([email protected], Shovel, 1)0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 0 [email protected] = Actor.Create(Mission1, #SPECIAL06, -534.3264, -103.8466, 63.2969)Actor.Angle([email protected]) = 89.2179Actor.Health([email protected]) = 2500Actor.AddArmour([email protected], 0)060B: set_actor [email protected] decision_maker_to 32 0446: set_actor [email protected] dismemberment_possible 0 04D8: set_actor [email protected] drowns_in_water 0 Actor.GiveWeaponAndAmmo([email protected], Shovel, 1)0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 0 [email protected] = Actor.Create(Mission1, #SPECIAL06, -545.2667, -73.7514, 62.8594)Actor.Angle([email protected]) = 89.2179Actor.Health([email protected]) = 2500Actor.AddArmour([email protected], 0)060B: set_actor [email protected] decision_maker_to 32 0446: set_actor [email protected] dismemberment_possible 0 04D8: set_actor [email protected] drowns_in_water 0 Actor.GiveWeaponAndAmmo([email protected], Cane, 1)0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 0 0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR 0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR 0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR 0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR 0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR0337: set_actor [email protected] visibility 00337: set_actor [email protected] visibility 00337: set_actor [email protected] visibility 00337: set_actor [email protected] visibility 00337: set_actor [email protected] visibility 0:SALVAMOR_THREAD_6969wait 0 if andActor.Dead([email protected])Actor.Dead([email protected])Actor.Dead([email protected])Actor.Dead([email protected])Actor.Dead([email protected])thenjump @SALVAMOR_THREAD_7979end:SALVAMOR_THREAD_7979wait 2000     0337: set_actor [email protected] visibility 10337: set_actor [email protected] visibility 10337: set_actor [email protected] visibility 10337: set_actor [email protected] visibility 10337: set_actor [email protected] visibility 10850: AS_actor [email protected] follow_actor $PLAYER_ACTOR 0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR 0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR 0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR 0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR Model.Destroy(#SPECIAL06)0296: unload_special_actor 6 :SALVAMOR_THREAD_723wait 0 if    Player.Defined($PLAYER_CHAR)else_jump @SALVAMOR_THREAD_797 if    not Actor.Dead([email protected])else_jump @SALVAMOR_THREAD_814 if 00F2:   actor $PLAYER_ACTOR near_actor [email protected] radius 180.0 180.0 0 else_jump @SALVAMOR_THREAD_797 jump @SALVAMOR_THREAD_723 :SALVAMOR_THREAD_797Actor.RemoveReferences([email protected])Actor.RemoveReferences([email protected])jump @SALVAMOR_THREAD_19 :SALVAMOR_THREAD_814Actor.RemoveReferences([email protected])Actor.RemoveReferences([email protected])0A93: end_custom_thread 
Edited by SpicyDragon
Link to comment
Share on other sites


// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013

{$CLEO .cs}

 

//-------------MAIN---------------

thread 'SALVAMOR_THREAD'

[email protected] = 0

 

:START

:SALVAMOR_THREAD_19

wait 0

if

Player.Defined($PLAYER_CHAR)

else_jump @SALVAMOR_THREAD_19

if

$ONMISSION == 0

else_jump @SALVAMOR_THREAD_19

if

00FE: actor $PLAYER_ACTOR sphere 0 in_sphere -510.8075 -87.0016 62.1429 radius 100.5 100.5 50.5

else_jump @SALVAMOR_THREAD_19

if and

00BF: [email protected] = current_time_hours, [email protected] = current_time_minutes

[email protected] >= 5

17 > [email protected]

else_jump @SALVAMOR_THREAD_145

jump @SALVAMOR_THREAD_19

 

:SALVAMOR_THREAD_145

Model.Load(#CHNSAW)

Model.Load(#GRENADE)

Model.Load(#SHOVEL)

Model.Load(#GUN_CANE)

023C: load_special_actor 'DRSAL' as 6 // models 290-299

038B: load_requested_models

 

:SALVAMOR_THREAD_180

wait 0

if

023D: special_actor 6 loaded

else_jump @SALVAMOR_THREAD_180

:SET

WAIT 200

[email protected] = Actor.Create(Mission1, #SPECIAL06, -489.3709, -181.6115, 78.2109)

Actor.Angle([email protected]) = 99.2446

Actor.Health([email protected]) = 2500

Actor.AddArmour([email protected], 0)

060B: set_actor [email protected] decision_maker_to 32

0446: set_actor [email protected] dismemberment_possible 0

04D8: set_actor [email protected] drowns_in_water 0

Actor.GiveWeaponAndAmmo([email protected], Chainsaw, 1)

0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 0

[email protected] = Actor.Create(Mission1, #SPECIAL06, -501.5675, -205.2137, 78.4062)

Actor.Angle([email protected]) = 89.2179

Actor.Health([email protected]) = 2500

Actor.AddArmour([email protected], 0)

060B: set_actor [email protected] decision_maker_to 32

0446: set_actor [email protected] dismemberment_possible 0

04D8: set_actor [email protected] drowns_in_water 0

Actor.GiveWeaponAndAmmo([email protected], Cane, 1)

0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 0

[email protected] = Actor.Create(Mission1, #SPECIAL06, -522.149, -180.8624, 78.1542)

Actor.Angle([email protected]) = 89.2179

Actor.Health([email protected]) = 2500

Actor.AddArmour([email protected], 0)

060B: set_actor [email protected] decision_maker_to 32

0446: set_actor [email protected] dismemberment_possible 0

04D8: set_actor [email protected] drowns_in_water 0

Actor.GiveWeaponAndAmmo([email protected], Chainsaw, 1)

0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 0

[email protected] = Actor.Create(Mission1, #SPECIAL06, -534.3264, -103.8466, 63.2969)

Actor.Angle([email protected]) = 89.2179

Actor.Health([email protected]) = 2500

Actor.AddArmour([email protected], 0)

060B: set_actor [email protected] decision_maker_to 32

0446: set_actor [email protected] dismemberment_possible 0

04D8: set_actor [email protected] drowns_in_water 0

Actor.GiveWeaponAndAmmo([email protected], Shovel, 1)

0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 0

[email protected] = Actor.Create(Mission1, #SPECIAL06, -504.2966, -199.0341, 78.4062)

Actor.Angle([email protected]) = 89.2179

Actor.Health([email protected]) = 2500

Actor.AddArmour([email protected], 0)

060B: set_actor [email protected] decision_maker_to 32

0446: set_actor [email protected] dismemberment_possible 0

04D8: set_actor [email protected] drowns_in_water 0

Actor.GiveWeaponAndAmmo([email protected], Cane, 1)

0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 0

wait 3000

[email protected] = Actor.Create(Mission1, #SPECIAL06, -537.7304, -98.7789, 63.2969)

Actor.Angle([email protected]) = 99.2446

Actor.Health([email protected]) = 2500

Actor.AddArmour([email protected], 0)

060B: set_actor [email protected] decision_maker_to 32

0446: set_actor [email protected] dismemberment_possible 0

04D8: set_actor [email protected] drowns_in_water 0

Actor.GiveWeaponAndAmmo([email protected], Shovel, 1)

0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 0

[email protected] = Actor.Create(Mission1, #SPECIAL06, -529.8821, -100.2222, 63.2969)

Actor.Angle([email protected]) = 89.2179

Actor.Health([email protected]) = 2500

Actor.AddArmour([email protected], 0)

060B: set_actor [email protected] decision_maker_to 32

0446: set_actor [email protected] dismemberment_possible 0

04D8: set_actor [email protected] drowns_in_water 0

Actor.GiveWeaponAndAmmo([email protected], Cane, 1)

0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 0

[email protected] = Actor.Create(Mission1, #SPECIAL06, -526.6510, -102.7788, 63.2969)

Actor.Angle([email protected]) = 89.2179

Actor.Health([email protected]) = 2500

Actor.AddArmour([email protected], 0)

060B: set_actor [email protected] decision_maker_to 32

0446: set_actor [email protected] dismemberment_possible 0

04D8: set_actor [email protected] drowns_in_water 0

Actor.GiveWeaponAndAmmo([email protected], Shovel, 1)

0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 0

[email protected] = Actor.Create(Mission1, #SPECIAL06, -534.3264, -103.8466, 63.2969)

Actor.Angle([email protected]) = 89.2179

Actor.Health([email protected]) = 2500

Actor.AddArmour([email protected], 0)

060B: set_actor [email protected] decision_maker_to 32

0446: set_actor [email protected] dismemberment_possible 0

04D8: set_actor [email protected] drowns_in_water 0

Actor.GiveWeaponAndAmmo([email protected], Shovel, 1)

0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 0

[email protected] = Actor.Create(Mission1, #SPECIAL06, -545.2667, -73.7514, 62.8594)

Actor.Angle([email protected]) = 89.2179

Actor.Health([email protected]) = 2500

Actor.AddArmour([email protected], 0)

060B: set_actor [email protected] decision_maker_to 32

0446: set_actor [email protected] dismemberment_possible 0

04D8: set_actor [email protected] drowns_in_water 0

Actor.GiveWeaponAndAmmo([email protected], Cane, 1)

0946: set_actor [email protected] actions_uninterupted_by_weapon_fire 0

0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR

0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR

05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR

05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR

0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR

05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR

0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR

05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR

0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR

05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR

0337: set_actor [email protected] visibility 0

0337: set_actor [email protected] visibility 0

0337: set_actor [email protected] visibility 0

0337: set_actor [email protected] visibility 0

0337: set_actor [email protected] visibility 0

WAIT 3000

0337: set_actor [email protected] visibility 1

0337: set_actor [email protected] visibility 1

0337: set_actor [email protected] visibility 1

0337: set_actor [email protected] visibility 1

0337: set_actor [email protected] visibility 1

0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR

0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR

05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR

05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR

0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR

05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR

0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR

05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR

0850: AS_actor [email protected] follow_actor $PLAYER_ACTOR

05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR

 

 

WHILE TRUE

wait 0

if and

Actor.Dead([email protected])

Actor.Dead([email protected])

Actor.Dead([email protected])

Actor.Dead([email protected])

Actor.Dead([email protected])

then

IF AND

Actor.Dead([email protected])

Actor.Dead([email protected])

Actor.Dead([email protected])

Actor.Dead([email protected])

Actor.Dead([email protected])

THEN

Actor.RemoveReferences([email protected])

Actor.RemoveReferences([email protected])

Actor.RemoveReferences([email protected])

Actor.RemoveReferences([email protected])

Actor.RemoveReferences([email protected])

Actor.RemoveReferences([email protected])

Actor.RemoveReferences([email protected])

Actor.RemoveReferences([email protected])

Actor.RemoveReferences([email protected])

Actor.RemoveReferences([email protected])

[email protected] += 1

GOTO @SET

END

IF [email protected] >= 3

THEN

[email protected] = 0

GOTO @START

END

END

END

Link to comment
Share on other sites

Another GTA Fan

As Sanmodder posted the answer, I want to ask something out of curiousity.

 

Wouldn't it be better to construct actor spawn scripts like this:

 

 

 

 

{$CLEO .cs}thread "EXAMPLE" [email protected] = 2:EXAMPLE_0wait 0 if    Player.Defined($PLAYER_CHAR)else_jump @EXAMPLE_0 wait 0if00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere 229.3 -204.601 0.894776 radius 50.0 50.0 50.0 on_foot else_jump @EXAMPLE_0 Model.Load(#FAM1)Model.Load(#KATANA)038B: load_requested_models :EXAMPLE_1wait 500 if andModel.Available(#FAM1)  Model.Available(#KATANA) else_jump @EXAMPLE_1 [email protected] = Actor.Create(Gang1, #FAM1, 229.3, -204.601, 0.894776)    Actor.GiveWeaponAndAmmo([email protected], Katana, 1)                                                                                    Actor.SetImmunities([email protected], 0, 0, 0, 0, 0)Actor.Health([email protected]) = 1000173: set_actor [email protected] Z_angle_to 0.00568: set_actor [email protected] untargetable 1093B: set_actor [email protected] upper_body_damage_anims_only 00946: set_actor [email protected] actions_uninterupted_by_weapon_fire 00446: set_actor [email protected] dismemberment_possible 0 04D8: set_actor [email protected] drowns_in_water 00A28: set_actor [email protected] swimming_speed_to 502A9: set_actor [email protected] immune_to_nonplayer 0 0489: set_actor [email protected] muted 00856: set_actor [email protected] enable_crouch 1060F: set_actor [email protected] melee_accuracy_to 90.007DD: set_actor [email protected] attack_rate 95087E: set_actor [email protected] weapon_droppable 10850: AS_actor [email protected] follow_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR [email protected] = Actor.Create(Gang1, #FAM1, 228.7, -201.351, 0.894776)    Actor.GiveWeaponAndAmmo([email protected], Katana, 1)                                                                                    Actor.SetImmunities([email protected], 0, 0, 0, 0, 0)Actor.Health([email protected]) = 1000173: set_actor [email protected] Z_angle_to 0.00568: set_actor [email protected] untargetable 1093B: set_actor [email protected] upper_body_damage_anims_only 00946: set_actor [email protected] actions_uninterupted_by_weapon_fire 00446: set_actor [email protected] dismemberment_possible 0 04D8: set_actor [email protected] drowns_in_water 00A28: set_actor [email protected] swimming_speed_to 502A9: set_actor [email protected] immune_to_nonplayer 0 0489: set_actor [email protected] muted 00856: set_actor [email protected] enable_crouch 1060F: set_actor [email protected] melee_accuracy_to 90.007DD: set_actor [email protected] attack_rate 85087E: set_actor [email protected] weapon_droppable 10850: AS_actor [email protected] follow_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR [email protected] = Actor.Create(Gang1, #FAM1, 229.6, -201.351, 0.894776)    Actor.GiveWeaponAndAmmo([email protected], Katana, 1)                                                                                    Actor.SetImmunities([email protected], 0, 0, 0, 0, 0)Actor.Health([email protected]) = 1000173: set_actor [email protected] Z_angle_to 0.00568: set_actor [email protected] untargetable 1093B: set_actor [email protected] upper_body_damage_anims_only 00946: set_actor [email protected] actions_uninterupted_by_weapon_fire 00446: set_actor [email protected] dismemberment_possible 0 04D8: set_actor [email protected] drowns_in_water 00A28: set_actor [email protected] swimming_speed_to 502A9: set_actor [email protected] immune_to_nonplayer 0 0489: set_actor [email protected] muted 00856: set_actor [email protected] enable_crouch 1060F: set_actor [email protected] melee_accuracy_to 90.007DD: set_actor [email protected] attack_rate 85087E: set_actor [email protected] weapon_droppable 10850: AS_actor [email protected] follow_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR [email protected] = Actor.Create(Gang1, #FAM1, 230.5, -201.351, 0.894776)    Actor.GiveWeaponAndAmmo([email protected], Katana, 1)                                                                                    Actor.SetImmunities([email protected], 0, 0, 0, 0, 0)Actor.Health([email protected]) = 1000173: set_actor [email protected] Z_angle_to 0.00568: set_actor [email protected] untargetable 1093B: set_actor [email protected] upper_body_damage_anims_only 00946: set_actor [email protected] actions_uninterupted_by_weapon_fire 00446: set_actor [email protected] dismemberment_possible 0 04D8: set_actor [email protected] drowns_in_water 00A28: set_actor [email protected] swimming_speed_to 502A9: set_actor [email protected] immune_to_nonplayer 0 0489: set_actor [email protected] muted 00856: set_actor [email protected] enable_crouch 1060F: set_actor [email protected] melee_accuracy_to 90.007DD: set_actor [email protected] attack_rate 85087E: set_actor [email protected] weapon_droppable 10850: AS_actor [email protected] follow_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR [email protected] = Actor.Create(Gang1, #FAM1, 231.4, -201.351, 0.894776)    Actor.GiveWeaponAndAmmo([email protected], Katana, 1)                                                                                    Actor.SetImmunities([email protected], 0, 0, 0, 0, 0)Actor.Health([email protected]) = 1000173: set_actor [email protected] Z_angle_to 0.00568: set_actor [email protected] untargetable 1093B: set_actor [email protected] upper_body_damage_anims_only 00946: set_actor [email protected] actions_uninterupted_by_weapon_fire 00446: set_actor [email protected] dismemberment_possible 0 04D8: set_actor [email protected] drowns_in_water 00A28: set_actor [email protected] swimming_speed_to 502A9: set_actor [email protected] immune_to_nonplayer 0 0489: set_actor [email protected] muted 00856: set_actor [email protected] enable_crouch 1060F: set_actor [email protected] melee_accuracy_to 90.007DD: set_actor [email protected] attack_rate 85087E: set_actor [email protected] weapon_droppable 10850: AS_actor [email protected] follow_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR Model.Destroy(#FAM1)Model.Destroy(#KATANA)jump @EXAMPLE_2:EXAMPLE_2wait 0 if andActor.Dead([email protected])Actor.Dead([email protected])Actor.Dead([email protected])Actor.Dead([email protected])Actor.Dead([email protected])else_jump @EXAMPLE_2 Actor.DestroyInstantly([email protected])Actor.DestroyInstantly([email protected])Actor.DestroyInstantly([email protected])Actor.DestroyInstantly([email protected])Actor.DestroyInstantly([email protected])[email protected] -= 1wait 3000jump @EXAMPLE_3 :EXAMPLE_3wait [email protected] > 0else_jump @EXAMPLE_4jump @EXAMPLE_1:EXAMPLE_4wait 500 if andModel.Available(#FAM1)  Model.Available(#KATANA) else_jump @EXAMPLE_4 [email protected] = Actor.Create(Gang1, #FAM1, 229.3, -204.601, 0.894776)    Actor.GiveWeaponAndAmmo([email protected], Katana, 1)                                                                                    Actor.SetImmunities([email protected], 0, 1, 1, 0, 0)Actor.Health([email protected]) = 10000173: set_actor [email protected] Z_angle_to 0.00568: set_actor [email protected] untargetable 1093B: set_actor [email protected] upper_body_damage_anims_only 00946: set_actor [email protected] actions_uninterupted_by_weapon_fire 00446: set_actor [email protected] dismemberment_possible 0 04D8: set_actor [email protected] drowns_in_water 00A28: set_actor [email protected] swimming_speed_to 502A9: set_actor [email protected] immune_to_nonplayer 0 0489: set_actor [email protected] muted 00856: set_actor [email protected] enable_crouch 1060F: set_actor [email protected] melee_accuracy_to 90.007DD: set_actor [email protected] attack_rate 95087E: set_actor [email protected] weapon_droppable 10850: AS_actor [email protected] follow_actor $PLAYER_ACTOR 05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR Model.Destroy(#FAM1)Model.Destroy(#KATANA)jump @EXAMPLE_5:EXAMPLE_5wait 0 ifActor.Dead([email protected])else_jump @EXAMPLE_5 Actor.RemoveReferences([email protected])jump @EXAMPLE_6 :EXAMPLE_60A93: end_custom_thread

 

 

I know every modder has their own way of making their scripts, but when it comes to actor spawn coding, I've always found the 'neat and tidy' simple scripts like the one in the spoiler tag above to be much quicker and easier to read and modify if you ever need to. Plus they never fail to work.

 

Just curious. Of course we all have our own way of making our scripts, but I thought I'd mention this.

 

PS. The script above spawns 2 waves of Grove members near PizzaStack in Blueberry, which has to be defeated twice until the 'Boss' grove member appears.

Edited by Recommended
Link to comment
Share on other sites

That's retarded tbh.

 

The best way is to (just like Veryzon said) use arrays and iterations.

 

You can even make the code shorter by using CLEO_CALL (0AB1) appropriately.

Link to comment
Share on other sites

Another GTA Fan

Why is it "retarded"?

 

Also, don't get me wrong, I never meant to say which way is better. Again, I'm sure every coder has their own way of doing these things, so I would never say one way is better over another, maybe more convenient, but not necessarily better.

 

But still... "retarded"? I wouldn't call any way "retarded". That's a bit of an immature word to use, especially for these types of things.

Link to comment
Share on other sites

Because you and everyone above you is copy pasting repetitive code. That's bad practice and it will affect negatively your coding sk1llz on the long run.

 

 

Let's say that you want to create X amounts of wave of peds,but each wave w/ different attributes (health,bla bla bla...).

 

How would you do it? By copy pasting X times the original subroutine that creates a wave? You would have to edit each attribute of each ped manually for that.This is not only time consuming but it will make the code harder to read and thus harder to maintain.

 

Oh and I forgot that modding is serious business,sorry for being so immature. :p

Link to comment
Share on other sites

Why is it "retarded"?

 

Also, don't get me wrong, I never meant to say which way is better. Again, I'm sure every coder has their own way of doing these things, so I would never say one way is better over another, maybe more convenient, but not necessarily better.

 

But still... "retarded"? I wouldn't call any way "retarded". That's a bit of an immature word to use, especially for these types of things.

I agree with you

maybe more convenient, but not necessarily better.

but this only knows the mass of scripters who write several scripts at the same time

eg I have 5,000 cleo scripts on my computer I can show

guru guru, if you say yes, do this script and show us how to do it

the author of the post will be happy to see if the gta exe program has stopped working

Veryzon well says it all the time you need to take care of your script to work as well as possible

Link to comment
Share on other sites

Another GTA Fan

@Guru, yeah true, though the script I posted was meant as a simple limited respawn of actors, nothing fancy, and of course as an example. Personally I find it to be a good thing that different modders post their own way of doing things. I just simply posted my own way of actor spawing. It's always done the job for me, so the way I do it is always there for those that might want to make use of it.

 

If you ask me, it's great we're all giving our own views on coding, as well as our own coding structures. I'm still learning coding myself, and it's neat to see others like Sanmodder posting his own script structures, which one day I may learn from.

 

I guess to put my point simple: This section is mostly about ideas and different ways in coding a script, as well as achieving our goals. I personally wouldn't put anyone down for how they write there's.

 

It's cool, though.

Link to comment
Share on other sites

@Guru, yeah true, though the script I posted was meant as a simple limited respawn of actors, nothing fancy, and of course as an example. Personally I find it to be a good thing that different modders post their own way of doing things. I just simply posted my own way of actor spawing. It's always done the job for me, so the way I do it is always there for those that might want to make use of it.

 

If you ask me, it's great we're all giving our own views on coding, as well as our own coding structures. I'm still learning coding myself, and it's neat to see others like Sanmodder posting his own script structures, which one day I may learn from.

 

I guess to put my point simple: This section is mostly about ideas and different ways in coding a script, as well as achieving our goals. I personally wouldn't put anyone down for how they write there's.

 

It's cool, though.

if you like my scripts

I did the same script for you

only smaller

// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013{$CLEO .cs}//-------------MAIN---------------thread "EXAMPLE"0167: [email protected] = create_marker_at 229.3 -204.601 0.894776 color 0 flag 20AC6: [email protected] = label @label offset  :start  repeatrepeatwait 0 until if Player.Defined(0)until if 00FF:   actor $PLAYER_ACTOR sphere 0 in_sphere 229.3 -204.601 0.894776 radius 50.0 50.0 50.0 on_foot :[email protected] = 0for [email protected] = 0 to 16 step 4    wait 20    0208: [email protected] = random_float_in_ranges 1.0 70.0     0208: [email protected] = random_float_in_ranges 100.0 200.0     04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset [email protected] [email protected] 1.0     0209: [email protected] = random_int_in_ranges 102 127    if [email protected] == 119 //security    then [email protected] += 1    end    0209: [email protected] = random_int_in_ranges 22 38    0781:  [email protected]  [email protected]    Model.Load([email protected])    Model.Load([email protected])    038B: load_requested_models    [email protected] = Actor.Create(Gang1, [email protected], [email protected], [email protected], [email protected])                         Actor.GiveWeaponAndAmmo([email protected], [email protected], 99999)    0888: create_marker_above_actor [email protected] handle_as [email protected] // versionB     Actor.SetImmunities([email protected], 0, 0, 0, 0, 0)    0446: set_actor [email protected] dismemberment_possible 0                                        07DD: set_actor [email protected] attack_rate 95                                                  05E2: AS_actor [email protected] kill_actor $PLAYER_ACTOR                                         0A8E: [email protected] = [email protected] + [email protected]                                                                 0A8C: write_memory [email protected] size 4 value [email protected] virtual_protect 0                        endwhile true    wait 0    for [email protected] = 0 to 16 step 4        0A8E: [email protected] = [email protected] + [email protected]         0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0            if not actor.Dead([email protected])                                                                                                                                    then                                                                                                      else if 056D:   actor [email protected] defined                                                                                                                         then                                                                                           Actor.RemoveReferences([email protected])                                                                                                        wait 100                                                                                                                          actor.DestroyInstantly([email protected])                                                                                                                          [email protected] += 1            end        end    end8ab0: 54 //6jf @clean    not [email protected] >= 5 jf @next not actor.Dead($PLAYER_ACTOR)jf @clean     end:cleanfor [email protected] = 0 to 16 step 4    0A8E: [email protected] = [email protected] + [email protected]     0A8D: [email protected] = read_memory [email protected] size 4 virtual_protect 0        Actor.RemoveReferences([email protected])endjump @start:labelhex 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00end

you probably wonder how this script creates 5 different actors with different weapons

 

then take a look at the script

 

see shemat

 

 

0AC6: memory label offset = label offset offset

 

for offset = 0 to 16 step 4 // counter

actor variable = Actor.Create (Gang1, 12 @, 6 @, 7 @, 8 @)

0A8E: memory on offset = memory label offset + offset

0A8C: write_memory memory on offset size 4 value actor variable virtual_protect 0

end

 

read end clean

for offset = 0 to 16 step 4

0A8E: memory on offset = memory label offset + offset

0A8D: actor variable = read_memory memory on offset size 4 virtual_protect 0

Actor.RemoveReferences (actor variable)

end

 

the memory stores 5 variable actors on different offsets

 

label offset

hex

00 00 00 00 // Actor 0, offset +0

00 00 00 00 // Actor 1, offset +4

00 00 00 00 // Actor 2, offset +8

00 00 00 00 // Actor 3, offset +12

00 00 00 00 // Actor 4, offset +16

end

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.