Welcome to Open Carnage

A resource for Halo 1 modding and tech, with unique means of rewarding individual content creation and support. Have a wander to see why we're worth the time! EST. 2012

Sign in to follow this  
Followers 0
giraffe

Map Scenario Scripts

Saves map scenario scripts to a txt file.

  • Based on Halo Script Extractor.exe by Skarma
  • Added indentation to make scripts easier to read
  • Fixed non static/stub scripts by removing return type
  • Fixed empty variables by adding quotations
  • Fixed variables with spaces by adding quotations
  • Fixed executing static void scripts within other scripts

 

Example output - bigass.map

Spoiler

(global boolean is_server false)
(global boolean is_host false)
(global short tod 3)
(global short plyrnum 0)

(script startup test1 
    (begin 
        (sleep 30) 
        (object_destroy c1) 
        (object_destroy c2) 
        (object_destroy c3) 
        (object_destroy c4) 
        (object_destroy c5) 
        (object_destroy c6) 
        (object_destroy c7) 
        (object_destroy c8) 
        (object_destroy c9) 
        (object_destroy c10) 
        (object_destroy c11) 
        (object_destroy c12) 
        (object_destroy c13) 
        (object_destroy c14) 
        (object_destroy c15) 
        (object_destroy c16) 
        (object_destroy d1) 
        (object_destroy d2) 
        (object_destroy d3) 
        (object_destroy d4) 
        (object_destroy d5) 
        (object_destroy d6) 
        (object_destroy d7) 
        (object_destroy d8) 
        (object_destroy d9) 
        (object_destroy d10) 
        (object_destroy d11) 
        (object_destroy d12) 
        (object_destroy d13) 
        (object_destroy d14) 
        (object_destroy d15) 
        (object_destroy d16)
    )
)

(script static void respawn_trees 
    (begin 
        (object_create_anew 1) 
        (object_create_anew 2) 
        (object_create_anew 3) 
        (object_create_anew 4) 
        (object_create_anew 5) 
        (object_create_anew 6) 
        (object_create_anew 7) 
        (object_create_anew 8) 
        (object_create_anew 9) 
        (object_create_anew 10) 
        (object_create_anew 11) 
        (object_create_anew 12) 
        (object_create_anew 13) 
        (object_create_anew 14) 
        (object_create_anew 15) 
        (object_create_anew 16) 
        (object_create_anew 17) 
        (object_create_anew 18) 
        (object_create_anew 19) 
        (object_create_anew 20) 
        (object_create_anew 21) 
        (object_create_anew 22) 
        (object_create_anew 23) 
        (object_create_anew 24) 
        (object_create_anew 25) 
        (object_create_anew 26) 
        (object_create_anew 27) 
        (object_create_anew 28) 
        (object_create_anew 29) 
        (object_create_anew 30) 
        (object_create_anew 31) 
        (object_create_anew 32) 
        (object_create_anew 33) 
        (object_create_anew 34) 
        (object_create_anew 35) 
        (object_create_anew 36) 
        (object_create_anew 37) 
        (object_create_anew 38) 
        (object_create_anew 39) 
        (object_create_anew 40) 
        (object_create_anew 41) 
        (object_create_anew 42) 
        (object_create_anew 43) 
        (object_create_anew 44) 
        (object_create_anew 45) 
        (object_create_anew 46) 
        (object_create_anew 47) 
        (object_create_anew 48) 
        (object_create_anew 49) 
        (object_create_anew 50) 
        (object_create_anew 51) 
        (object_create_anew 52) 
        (object_create_anew 53) 
        (object_create_anew 54) 
        (object_create_anew 55) 
        (object_create_anew 56) 
        (object_create_anew 57) 
        (object_create_anew 58) 
        (object_create_anew 59) 
        (object_create_anew 60) 
        (object_create_anew 61) 
        (object_create_anew 62) 
        (object_create_anew 63) 
        (object_create_anew 64) 
        (object_create_anew 65) 
        (object_create_anew 66) 
        (object_create_anew 67) 
        (object_create_anew 68) 
        (object_create_anew 69) 
        (object_create_anew 70) 
        (object_create_anew 71) 
        (object_create_anew 72) 
        (object_create_anew 73) 
        (object_create_anew 74) 
        (object_create_anew 75) 
        (object_create_anew 76) 
        (object_create_anew 77) 
        (object_create_anew 78) 
        (object_create_anew 79) 
        (object_create_anew 80) 
        (object_create_anew 81) 
        (object_create_anew 82) 
        (object_create_anew 83) 
        (object_create_anew 84) 
        (object_create_anew 85) 
        (object_create_anew 86) 
        (object_create_anew 87) 
        (object_create_anew 88) 
        (object_create_anew 89) 
        (object_create_anew 90) 
        (object_create_anew 91) 
        (object_create_anew 92) 
        (object_create_anew 93) 
        (object_create_anew 94) 
        (object_create_anew 95) 
        (object_create_anew 96) 
        (object_create_anew 97) 
        (object_create_anew 98) 
        (object_create_anew 99) 
        (object_create_anew 100) 
        (object_create_anew 101) 
        (object_create_anew 102) 
        (object_create_anew 103) 
        (object_create_anew 104) 
        (object_create_anew 105) 
        (object_create_anew 106) 
        (object_create_anew 107) 
        (object_create_anew 108) 
        (object_create_anew 109) 
        (object_create_anew 110) 
        (object_create_anew 111) 
        (object_create_anew 112) 
        (object_create_anew 113) 
        (object_create_anew 114) 
        (object_create_anew 115) 
        (object_create_anew 116) 
        (object_create_anew 117) 
        (object_create_anew 118) 
        (object_create_anew 119) 
        (object_create_anew 120) 
        (object_create_anew 121) 
        (object_create_anew 122) 
        (object_create_anew 123) 
        (object_create_anew 124) 
        (object_create_anew 125) 
        (object_create_anew 126) 
        (object_create_anew 127) 
        (object_create_anew 128) 
        (object_create_anew 129) 
        (object_create_anew 130) 
        (object_create_anew 131) 
        (object_create_anew 132) 
        (object_create_anew 133) 
        (object_create_anew 134) 
        (object_create_anew 135) 
        (object_create_anew 136) 
        (object_create_anew 137) 
        (object_create_anew 138) 
        (object_create_anew 139) 
        (object_create_anew 140) 
        (object_create_anew 141) 
        (object_create_anew 142) 
        (object_create_anew 143) 
        (object_create_anew 144) 
        (object_create_anew 145) 
        (object_create_anew 146) 
        (object_create_anew 147) 
        (object_create_anew 148) 
        (object_create_anew 149) 
        (object_create_anew 150) 
        (object_create_anew 151) 
        (object_create_anew 152) 
        (object_create_anew 153) 
        (object_create_anew 154) 
        (object_create_anew 155) 
        (object_create_anew 156) 
        (object_create_anew 157) 
        (object_create_anew 158) 
        (object_create_anew 159) 
        (object_create_anew 160) 
        (object_create_anew 161) 
        (object_create_anew 162) 
        (object_create_anew 163) 
        (object_create_anew 164) 
        (object_create_anew 165) 
        (object_create_anew 166) 
        (object_create_anew 167) 
        (object_create_anew 168) 
        (object_create_anew 169) 
        (object_create_anew 170) 
        (object_create_anew 171) 
        (object_create_anew 172) 
        (object_create_anew 173) 
        (object_create_anew 174) 
        (object_create_anew 175) 
        (object_create_anew 176) 
        (object_create_anew 177) 
        (object_create_anew 178) 
        (object_create_anew 179) 
        (object_create_anew 180) 
        (object_create_anew 181) 
        (object_create_anew 182) 
        (object_create_anew 183) 
        (object_create_anew 184) 
        (object_create_anew 185) 
        (object_create_anew 186) 
        (object_create_anew 187) 
        (object_create_anew 188) 
        (object_create_anew 189) 
        (object_create_anew 190) 
        (object_create_anew 191) 
        (object_create_anew 192) 
        (object_create_anew 193) 
        (object_create_anew 194) 
        (object_create_anew 195) 
        (object_create_anew 196) 
        (object_create_anew 197) 
        (object_create_anew 198) 
        (object_create_anew 199) 
        (object_create_anew 200) 
        (object_create_anew 201) 
        (object_create_anew 202) 
        (object_create_anew 203) 
        (object_create_anew 204) 
        (object_create_anew 205) 
        (object_create_anew 206) 
        (object_create_anew 207) 
        (object_create_anew 208) 
        (object_create_anew 209) 
        (object_create_anew 210) 
        (object_create_anew 211) 
        (object_create_anew 212) 
        (object_create_anew 213) 
        (object_create_anew 214) 
        (object_create_anew 215) 
        (object_create_anew 216) 
        (object_create_anew 217)
    )
)

(script static void snow_trees 
    (begin 
        (object_set_permutation 1 "" "~snow") 
        (object_set_permutation 2 "" "~snow") 
        (object_set_permutation 3 "" "~snow") 
        (object_set_permutation 4 "" "~snow") 
        (object_set_permutation 5 "" "~snow") 
        (object_set_permutation 6 "" "~snow") 
        (object_set_permutation 7 "" "~snow") 
        (object_set_permutation 8 "" "~snow") 
        (object_set_permutation 9 "" "~snow") 
        (object_set_permutation 10 "" "~snow") 
        (object_set_permutation 11 "" "~snow") 
        (object_set_permutation 12 "" "~snow") 
        (object_set_permutation 13 "" "~snow") 
        (object_set_permutation 14 "" "~snow") 
        (object_set_permutation 15 "" "~snow") 
        (object_set_permutation 16 "" "~snow") 
        (object_set_permutation 17 "" "~snow") 
        (object_set_permutation 18 "" "~snow") 
        (object_set_permutation 19 "" "~snow") 
        (object_set_permutation 20 "" "~snow") 
        (object_set_permutation 21 "" "~snow") 
        (object_set_permutation 22 "" "~snow") 
        (object_set_permutation 23 "" "~snow") 
        (object_set_permutation 24 "" "~snow") 
        (object_set_permutation 25 "" "~snow") 
        (object_set_permutation 26 "" "~snow") 
        (object_set_permutation 27 "" "~snow") 
        (object_set_permutation 28 "" "~snow") 
        (object_set_permutation 29 "" "~snow") 
        (object_set_permutation 30 "" "~snow") 
        (sleep 1) 
        (object_set_permutation 31 "" "~snow") 
        (object_set_permutation 32 "" "~snow") 
        (object_set_permutation 33 "" "~snow") 
        (object_set_permutation 34 "" "~snow") 
        (object_set_permutation 35 "" "~snow") 
        (object_set_permutation 36 "" "~snow") 
        (object_set_permutation 37 "" "~snow") 
        (object_set_permutation 38 "" "~snow") 
        (object_set_permutation 39 "" "~snow") 
        (object_set_permutation 40 "" "~snow") 
        (object_set_permutation 41 "" "~snow") 
        (object_set_permutation 42 "" "~snow") 
        (object_set_permutation 43 "" "~snow") 
        (object_set_permutation 44 "" "~snow") 
        (object_set_permutation 45 "" "~snow") 
        (object_set_permutation 46 "" "~snow") 
        (object_set_permutation 47 "" "~snow") 
        (object_set_permutation 48 "" "~snow") 
        (object_set_permutation 49 "" "~snow") 
        (object_set_permutation 50 "" "~snow") 
        (object_set_permutation 51 "" "~snow") 
        (object_set_permutation 52 "" "~snow") 
        (object_set_permutation 53 "" "~snow") 
        (object_set_permutation 54 "" "~snow") 
        (object_set_permutation 55 "" "~snow") 
        (object_set_permutation 56 "" "~snow") 
        (object_set_permutation 57 "" "~snow") 
        (object_set_permutation 58 "" "~snow") 
        (object_set_permutation 59 "" "~snow") 
        (sleep 1) 
        (object_set_permutation 60 "" "~snow") 
        (object_set_permutation 61 "" "~snow") 
        (object_set_permutation 62 "" "~snow") 
        (object_set_permutation 63 "" "~snow") 
        (object_set_permutation 64 "" "~snow") 
        (object_set_permutation 65 "" "~snow") 
        (object_set_permutation 66 "" "~snow") 
        (object_set_permutation 67 "" "~snow") 
        (object_set_permutation 68 "" "~snow") 
        (object_set_permutation 69 "" "~snow") 
        (object_set_permutation 70 "" "~snow") 
        (object_set_permutation 71 "" "~snow") 
        (object_set_permutation 72 "" "~snow") 
        (object_set_permutation 73 "" "~snow") 
        (object_set_permutation 74 "" "~snow") 
        (object_set_permutation 75 "" "~snow") 
        (object_set_permutation 76 "" "~snow") 
        (object_set_permutation 77 "" "~snow") 
        (object_set_permutation 78 "" "~snow") 
        (object_set_permutation 79 "" "~snow") 
        (object_set_permutation 80 "" "~snow") 
        (object_set_permutation 81 "" "~snow") 
        (object_set_permutation 82 "" "~snow") 
        (object_set_permutation 83 "" "~snow") 
        (object_set_permutation 84 "" "~snow") 
        (object_set_permutation 85 "" "~snow") 
        (object_set_permutation 86 "" "~snow") 
        (object_set_permutation 87 "" "~snow") 
        (object_set_permutation 88 "" "~snow") 
        (object_set_permutation 89 "" "~snow") 
        (sleep 1) 
        (object_set_permutation 90 "" "~snow") 
        (object_set_permutation 91 "" "~snow") 
        (object_set_permutation 92 "" "~snow") 
        (object_set_permutation 93 "" "~snow") 
        (object_set_permutation 94 "" "~snow") 
        (object_set_permutation 95 "" "~snow") 
        (object_set_permutation 96 "" "~snow") 
        (object_set_permutation 97 "" "~snow") 
        (object_set_permutation 98 "" "~snow") 
        (object_set_permutation 99 "" "~snow") 
        (object_set_permutation 100 "" "~snow") 
        (object_set_permutation 101 "" "~snow") 
        (object_set_permutation 102 "" "~snow") 
        (object_set_permutation 103 "" "~snow") 
        (object_set_permutation 104 "" "~snow") 
        (object_set_permutation 105 "" "~snow") 
        (object_set_permutation 106 "" "~snow") 
        (object_set_permutation 107 "" "~snow") 
        (object_set_permutation 108 "" "~snow") 
        (object_set_permutation 109 "" "~snow") 
        (object_set_permutation 110 "" "~snow") 
        (object_set_permutation 111 "" "~snow") 
        (object_set_permutation 112 "" "~snow") 
        (object_set_permutation 113 "" "~snow") 
        (object_set_permutation 114 "" "~snow") 
        (object_set_permutation 115 "" "~snow") 
        (object_set_permutation 116 "" "~snow") 
        (object_set_permutation 117 "" "~snow") 
        (object_set_permutation 118 "" "~snow") 
        (object_set_permutation 119 "" "~snow") 
        (object_set_permutation 120 "" "~snow") 
        (object_set_permutation 121 "" "~snow") 
        (object_set_permutation 122 "" "~snow") 
        (object_set_permutation 123 "" "~snow") 
        (object_set_permutation 124 "" "~snow") 
        (object_set_permutation 125 "" "~snow") 
        (object_set_permutation 126 "" "~snow") 
        (object_set_permutation 127 "" "~snow") 
        (object_set_permutation 128 "" "~snow") 
        (object_set_permutation 129 "" "~snow") 
        (object_set_permutation 130 "" "~snow") 
        (sleep 1) 
        (object_set_permutation 131 "" "~snow") 
        (object_set_permutation 132 "" "~snow") 
        (object_set_permutation 133 "" "~snow") 
        (object_set_permutation 134 "" "~snow") 
        (object_set_permutation 135 "" "~snow") 
        (object_set_permutation 136 "" "~snow") 
        (object_set_permutation 137 "" "~snow") 
        (object_set_permutation 138 "" "~snow") 
        (object_set_permutation 139 "" "~snow") 
        (object_set_permutation 140 "" "~snow") 
        (object_set_permutation 141 "" "~snow") 
        (object_set_permutation 142 "" "~snow") 
        (object_set_permutation 143 "" "~snow") 
        (object_set_permutation 144 "" "~snow") 
        (object_set_permutation 145 "" "~snow") 
        (object_set_permutation 146 "" "~snow") 
        (object_set_permutation 147 "" "~snow") 
        (object_set_permutation 148 "" "~snow") 
        (object_set_permutation 149 "" "~snow") 
        (object_set_permutation 150 "" "~snow") 
        (object_set_permutation 151 "" "~snow") 
        (object_set_permutation 152 "" "~snow") 
        (object_set_permutation 153 "" "~snow") 
        (object_set_permutation 154 "" "~snow") 
        (object_set_permutation 155 "" "~snow") 
        (object_set_permutation 156 "" "~snow") 
        (object_set_permutation 157 "" "~snow") 
        (object_set_permutation 158 "" "~snow") 
        (object_set_permutation 159 "" "~snow") 
        (object_set_permutation 160 "" "~snow") 
        (object_set_permutation 161 "" "~snow") 
        (object_set_permutation 162 "" "~snow") 
        (object_set_permutation 163 "" "~snow") 
        (object_set_permutation 164 "" "~snow") 
        (object_set_permutation 165 "" "~snow") 
        (object_set_permutation 166 "" "~snow") 
        (object_set_permutation 167 "" "~snow") 
        (object_set_permutation 168 "" "~snow") 
        (object_set_permutation 169 "" "~snow") 
        (object_set_permutation 170 "" "~snow") 
        (object_set_permutation 171 "" "~snow") 
        (object_set_permutation 172 "" "~snow") 
        (object_set_permutation 173 "" "~snow") 
        (object_set_permutation 174 "" "~snow") 
        (object_set_permutation 175 "" "~snow") 
        (object_set_permutation 176 "" "~snow") 
        (object_set_permutation 177 "" "~snow") 
        (object_set_permutation 178 "" "~snow") 
        (object_set_permutation 179 "" "~snow") 
        (object_set_permutation 180 "" "~snow") 
        (object_set_permutation 181 "" "~snow") 
        (object_set_permutation 182 "" "~snow") 
        (object_set_permutation 183 "" "~snow") 
        (object_set_permutation 184 "" "~snow") 
        (object_set_permutation 185 "" "~snow") 
        (object_set_permutation 186 "" "~snow") 
        (object_set_permutation 187 "" "~snow") 
        (object_set_permutation 188 "" "~snow") 
        (object_set_permutation 189 "" "~snow") 
        (object_set_permutation 190 "" "~snow") 
        (object_set_permutation 191 "" "~snow") 
        (object_set_permutation 192 "" "~snow") 
        (object_set_permutation 193 "" "~snow") 
        (object_set_permutation 194 "" "~snow") 
        (object_set_permutation 195 "" "~snow") 
        (object_set_permutation 196 "" "~snow") 
        (object_set_permutation 197 "" "~snow") 
        (object_set_permutation 198 "" "~snow") 
        (object_set_permutation 199 "" "~snow") 
        (object_set_permutation 200 "" "~snow") 
        (object_set_permutation 201 "" "~snow") 
        (object_set_permutation 202 "" "~snow") 
        (object_set_permutation 203 "" "~snow") 
        (object_set_permutation 204 "" "~snow") 
        (object_set_permutation 205 "" "~snow") 
        (object_set_permutation 206 "" "~snow") 
        (object_set_permutation 207 "" "~snow") 
        (object_set_permutation 208 "" "~snow") 
        (object_set_permutation 209 "" "~snow") 
        (object_set_permutation 210 "" "~snow") 
        (object_set_permutation 211 "" "~snow") 
        (object_set_permutation 212 "" "~snow") 
        (object_set_permutation 213 "" "~snow") 
        (object_set_permutation 214 "" "~snow") 
        (object_set_permutation 215 "" "~snow") 
        (object_set_permutation 216 "" "~snow") 
        (object_set_permutation 217 "" "~snow")
    )
)

(script continuous respawn_example 
    (begin 
        (sleep_until 
            (or 
                (= 
                    (unit_get_shield example_vehicle) 0
                ) 
                (volume_test_object trigvol example_vehicle)
            )
        ) 
        (if 
            (= 
                (unit_get_shield example_vehicle) 0
            ) 
            (begin 
                (sleep_until 
                    (begin 
                        (if 
                            (!= 
                                (list_count 
                                    (vehicle_riders example_vehicle)
                                ) 0
                            ) 
                            (unit_kill 
                                (unit 
                                    (list_get 
                                        (vehicle_riders example_vehicle) 0
                                    )
                                )
                            )
                        ) 
                        (= 
                            (list_count 
                                (vehicle_riders example_vehicle)
                            ) 0
                        )
                    ) 0
                ) 
                (object_create destroyed_copy) 
                (objects_attach example_vehicle "destroy" destroyed_copy "damage") 
                (objects_detach example_vehicle destroyed_copy) 
                (object_destroy example_vehicle) 
                (object_create left_wing) 
                (objects_attach destroyed_copy "left_wing" left_wing "") 
                (object_create right_wing) 
                (objects_attach destroyed_copy "right_wing" right_wing "") 
                (object_create tail) 
                (objects_attach destroyed_copy "tail" tail "") 
                (objects_detach destroyed_copy left_wing) 
                (objects_detach destroyed_copy right_wing) 
                (objects_detach destroyed_copy tail) 
                (sleep_until 
                    (volume_test_object trigvol destroyed_copy)
                ) 
                (object_destroy destroyed_copy) 
                (object_destroy left_wing) 
                (object_destroy right_wing) 
                (object_destroy tail)
            )
        ) 
        (object_create_anew example_vehicle)
    )
)

(script startup setup 
    (begin 
        (if 
            (!= 
                (unit_get_health check_vehicle) -1
            ) 
            (begin 
                (object_create example_vehicle) 
                (object_create example_vehicle2) 
                (set is_host true)
            ) 
            (sleep -1 respawn_example)
        )
    )
)

(script continuous respawn_example2 
    (begin 
        (if 
            (= is_host false) 
            (sleep -1)
        ) 
        (sleep_until 
            (or 
                (= 
                    (unit_get_shield example_vehicle2) 0
                ) 
                (volume_test_object trigvol example_vehicle2)
            )
        ) 
        (if 
            (= 
                (unit_get_shield example_vehicle2) 0
            ) 
            (begin 
                (sleep_until 
                    (begin 
                        (if 
                            (!= 
                                (list_count 
                                    (vehicle_riders example_vehicle2)
                                ) 0
                            ) 
                            (unit_kill 
                                (unit 
                                    (list_get 
                                        (vehicle_riders example_vehicle2) 0
                                    )
                                )
                            )
                        ) 
                        (= 
                            (list_count 
                                (vehicle_riders example_vehicle2)
                            ) 0
                        )
                    ) 0
                ) 
                (object_create destroyed_copy2) 
                (objects_attach example_vehicle2 "destroy" destroyed_copy2 "damage") 
                (objects_detach example_vehicle2 destroyed_copy2) 
                (object_destroy example_vehicle2) 
                (object_create left_wing2) 
                (objects_attach destroyed_copy2 "left_wing" left_wing2 "") 
                (object_create right_wing2) 
                (objects_attach destroyed_copy2 "right_wing" right_wing2 "") 
                (object_create tail2) 
                (objects_attach destroyed_copy2 "tail" tail2 "") 
                (objects_detach destroyed_copy2 left_wing2) 
                (objects_detach destroyed_copy2 right_wing2) 
                (objects_detach destroyed_copy2 tail2) 
                (sleep_until 
                    (volume_test_object trigvol destroyed_copy2)
                ) 
                (object_destroy destroyed_copy2) 
                (object_destroy left_wing2) 
                (object_destroy right_wing2) 
                (object_destroy tail2)
            )
        ) 
        (object_create_anew example_vehicle2)
    )
)

(script continuous scorpion_destruction 
    (begin 
        (if 
            (= is_host false) 
            (sleep -1)
        ) 
        (sleep_until 
            (or 
                (= 
                    (unit_get_shield scorpion) 0
                ) 
                (volume_test_object trigvol scorpion)
            )
        ) 
        (if 
            (= 
                (unit_get_shield scorpion) 0
            ) 
            (begin 
                (sleep_until 
                    (begin 
                        (if 
                            (!= 
                                (list_count 
                                    (vehicle_riders scorpion)
                                ) 0
                            ) 
                            (unit_kill 
                                (unit 
                                    (list_get 
                                        (vehicle_riders scorpion) 0
                                    )
                                )
                            )
                        ) 
                        (= 
                            (list_count 
                                (vehicle_riders scorpion)
                            ) 0
                        )
                    ) 0
                ) 
                (object_create scorpion_destroyed) 
                (objects_attach scorpion "" scorpion_destroyed "damage") 
                (objects_detach scorpion scorpion_destroyed) 
                (object_destroy scorpion) 
                (sleep_until 
                    (volume_test_object trigvol scorpion_destroyed)
                ) 
                (object_destroy scorpion_destroyed)
            )
        ) 
        (object_create_anew scorpion)
    )
)

(script continuous scorpion_destruction2 
    (begin 
        (if 
            (= is_host false) 
            (sleep -1)
        ) 
        (sleep_until 
            (or 
                (= 
                    (unit_get_shield scorpion2) 0
                ) 
                (volume_test_object trigvol scorpion2)
            )
        ) 
        (if 
            (= 
                (unit_get_shield scorpion2) 0
            ) 
            (begin 
                (sleep_until 
                    (begin 
                        (if 
                            (!= 
                                (list_count 
                                    (vehicle_riders scorpion2)
                                ) 0
                            ) 
                            (unit_kill 
                                (unit 
                                    (list_get 
                                        (vehicle_riders scorpion2) 0
                                    )
                                )
                            )
                        ) 
                        (= 
                            (list_count 
                                (vehicle_riders scorpion2)
                            ) 0
                        )
                    ) 0
                ) 
                (object_create scorpion_destroyed2) 
                (objects_attach scorpion2 "" scorpion_destroyed2 "damage") 
                (objects_detach scorpion2 scorpion_destroyed2) 
                (object_destroy scorpion2) 
                (sleep_until 
                    (volume_test_object trigvol scorpion_destroyed2)
                ) 
                (object_destroy scorpion_destroyed)
            )
        ) 
        (object_create_anew scorpion2)
    )
)

(script continuous falcon_smoke 
    (begin 
        (if 
            (= is_host false) 
            (sleep -1)
        ) 
        (if 
            (< 
                (unit_get_shield example_vehicle) 0.40000000596046
            ) 
            (begin 
                (object_create smoke1) 
                (objects_attach example_vehicle "smoke" smoke1 "smoke") 
                (objects_detach example_vehicle smoke1) 
                (sleep 5) 
                (object_destroy smoke1)
            ) 
            (begin 
                (object_destroy smoke1) 
                (sleep 30)
            )
        )
    )
)

(script continuous falcon_smoke2 
    (begin 
        (if 
            (= is_host false) 
            (sleep -1)
        ) 
        (if 
            (< 
                (unit_get_shield example_vehicle2) 0.40000000596046
            ) 
            (begin 
                (object_create smoke2) 
                (objects_attach example_vehicle2 "smoke" smoke2 "smoke") 
                (objects_detach example_vehicle2 smoke2) 
                (sleep 5) 
                (object_destroy smoke2)
            ) 
            (begin 
                (object_destroy smoke2) 
                (sleep 30)
            )
        )
    )
)

(script continuous scorpion_smoke1 
    (begin 
        (if 
            (= is_host false) 
            (sleep -1)
        ) 
        (if 
            (< 
                (unit_get_shield scorpion) 0.40000000596046
            ) 
            (begin 
                (object_create smoke3) 
                (objects_attach scorpion "engine" smoke3 "smoke") 
                (objects_detach scorpion smoke3) 
                (sleep 10) 
                (object_destroy smoke3)
            ) 
            (begin 
                (object_destroy smoke3) 
                (sleep 30)
            )
        )
    )
)

(script continuous scorpion_smoke2 
    (begin 
        (if 
            (= is_host false) 
            (sleep -1)
        ) 
        (if 
            (< 
                (unit_get_shield scorpion2) 0.40000000596046
            ) 
            (begin 
                (object_create smoke4) 
                (objects_attach scorpion2 "engine" smoke4 "smoke") 
                (objects_detach scorpion2 smoke4) 
                (sleep 10) 
                (object_destroy smoke4)
            ) 
            (begin 
                (object_destroy smoke4) 
                (sleep 30)
            )
        )
    )
)

(script continuous truck_destruction 
    (begin 
        (if 
            (= is_host false) 
            (sleep -1)
        ) 
        (sleep_until 
            (or 
                (= 
                    (unit_get_shield truck) 0
                ) 
                (volume_test_object trigvol truck)
            )
        ) 
        (if 
            (= 
                (unit_get_shield truck) 0
            ) 
            (begin 
                (sleep_until 
                    (begin 
                        (if 
                            (!= 
                                (list_count 
                                    (vehicle_riders truck)
                                ) 0
                            ) 
                            (unit_kill 
                                (unit 
                                    (list_get 
                                        (vehicle_riders truck) 0
                                    )
                                )
                            )
                        ) 
                        (= 
                            (list_count 
                                (vehicle_riders truck)
                            ) 0
                        )
                    ) 0
                ) 
                (object_create truck_destroyed) 
                (objects_attach truck "" truck_destroyed "damage") 
                (objects_detach truck truck_destroyed) 
                (object_destroy truck) 
                (object_create wheel) 
                (objects_attach truck_destroyed "wheel" wheel "") 
                (objects_detach truck_destroyed wheel) 
                (sleep_until 
                    (volume_test_object trigvol truck_destroyed)
                ) 
                (object_destroy truck_destroyed) 
                (object_destroy wheel)
            )
        ) 
        (object_create_anew truck)
    )
)

(script continuous truck_destruction2 
    (begin 
        (if 
            (= is_host false) 
            (sleep -1)
        ) 
        (sleep_until 
            (or 
                (= 
                    (unit_get_shield truck2) 0
                ) 
                (volume_test_object trigvol truck2)
            )
        ) 
        (if 
            (= 
                (unit_get_shield truck2) 0
            ) 
            (begin 
                (sleep_until 
                    (begin 
                        (if 
                            (!= 
                                (list_count 
                                    (vehicle_riders truck2)
                                ) 0
                            ) 
                            (unit_kill 
                                (unit 
                                    (list_get 
                                        (vehicle_riders truck2) 0
                                    )
                                )
                            )
                        ) 
                        (= 
                            (list_count 
                                (vehicle_riders truck2)
                            ) 0
                        )
                    ) 0
                ) 
                (object_create truck_destroyed2) 
                (objects_attach truck2 "" truck_destroyed2 "damage") 
                (objects_detach truck2 truck_destroyed2) 
                (object_destroy truck2) 
                (object_create wheel2) 
                (objects_attach truck_destroyed2 "wheel" wheel2 "") 
                (objects_detach truck_destroyed2 wheel2) 
                (sleep_until 
                    (volume_test_object trigvol truck_destroyed2)
                ) 
                (object_destroy truck_destroyed2) 
                (object_destroy wheel2)
            )
        ) 
        (object_create_anew truck2)
    )
)

(script continuous truck_smoke 
    (begin 
        (if 
            (= is_host false) 
            (sleep -1)
        ) 
        (if 
            (< 
                (unit_get_shield truck) 0.40000000596046
            ) 
            (begin 
                (object_create smoke5) 
                (objects_attach truck "engine" smoke5 "smoke") 
                (objects_detach truck smoke5) 
                (sleep 10) 
                (object_destroy smoke5)
            ) 
            (begin 
                (object_destroy smoke5) 
                (sleep 30)
            )
        )
    )
)

(script continuous truck_smoke2 
    (begin 
        (if 
            (= is_host false) 
            (sleep -1)
        ) 
        (if 
            (< 
                (unit_get_shield truck2) 0.40000000596046
            ) 
            (begin 
                (object_create smoke6) 
                (objects_attach truck2 "engine" smoke6 "smoke") 
                (objects_detach truck2 smoke6) 
                (sleep 10) 
                (object_destroy smoke6)
            ) 
            (begin 
                (object_destroy smoke6) 
                (sleep 30)
            )
        )
    )
)

(script startup create_vehicles 
    (begin 
        (if 
            (!= 
                (unit_get_health check_vehicle) -1
            ) 
            (begin 
                (set is_server true) 
                (sleep 30) 
                (object_destroy check_vehicle) 
                (object_create rox) 
                (object_create spade) 
                (object_create scorpion) 
                (object_create scorpion2)
            )
        )
    )
)

(script continuous spawn_turret1_collision 
    (begin 
        (sleep 30) 
        (if 
            (= is_server true) 
            (begin 
                (sleep_until 
                    (> 
                        (unit_get_health turret1) -1
                    )
                ) 
                (object_create turret1_col) 
                (sleep_until 
                    (= 
                        (unit_get_health turret1) -1
                    )
                ) 
                (object_destroy turret1_col)
            ) 
            (sleep -1)
        )
    )
)

(script continuous spawn_turret2_collision 
    (begin 
        (sleep 30) 
        (if 
            (= is_server true) 
            (begin 
                (sleep_until 
                    (> 
                        (unit_get_health turret2) -1
                    )
                ) 
                (object_create turret2_col) 
                (sleep_until 
                    (= 
                        (unit_get_health turret2) -1
                    )
                ) 
                (object_destroy turret2_col)
            ) 
            (sleep -1)
        )
    )
)

(script continuous respawn_vehicles 
    (begin 
        (if 
            (= is_server true) 
            (begin 
                (if 
                    (= 
                        (volume_test_object trigvol rox) true
                    ) 
                    (begin 
                        (object_teleport rox roox) 
                        (object_set_facing rox roox)
                    )
                ) 
                (if 
                    (= 
                        (volume_test_object trigvol spade) true
                    ) 
                    (begin 
                        (object_teleport spade spade_spawn) 
                        (object_set_facing spade spade_spawn)
                    )
                ) 
                (if 
                    (= 
                        (volume_test_object trigvol kat1) true
                    ) 
                    (begin 
                        (object_teleport kat1 kat1_spawn) 
                        (object_set_facing kat1 kat1_spawn)
                    )
                ) 
                (if 
                    (= 
                        (volume_test_object trigvol kat2) true
                    ) 
                    (begin 
                        (object_teleport kat2 kat2_spawn) 
                        (object_set_facing kat2 kat2_spawn)
                    )
                ) 
                (if 
                    (= 
                        (volume_test_object trigvol mortar1) true
                    ) 
                    (begin 
                        (object_teleport mortar1 mortar1_spawn) 
                        (object_set_facing mortar1 mortar1_spawn)
                    )
                ) 
                (if 
                    (= 
                        (volume_test_object trigvol mortar2) true
                    ) 
                    (begin 
                        (object_teleport mortar2 mortar2_spawn) 
                        (object_set_facing mortar2 mortar2_spawn)
                    )
                ) 
                (if 
                    (= 
                        (volume_test_object trigvol grackle1) true
                    ) 
                    (begin 
                        (object_teleport grackle1 grackle1_spawn) 
                        (object_set_facing grackle1 grackle1_spawn)
                    )
                ) 
                (if 
                    (= 
                        (volume_test_object trigvol grackle2) true
                    ) 
                    (begin 
                        (object_teleport grackle2 grackle2_spawn) 
                        (object_set_facing grackle2 grackle2_spawn)
                    )
                )
            ) 
            (sleep -1)
        )
    )
)

(script continuous hog_unblock 
    (begin 
        (sleep 60) 
        (if 
            (= is_host false) 
            (sleep -1)
        ) 
        (if 
            (= 
                (volume_test_object block hawg) true
            ) 
            (object_teleport hawg unblock)
        ) 
        (if 
            (= 
                (volume_test_object block hawg2) true
            ) 
            (object_teleport hawg2 unblock)
        ) 
        (if 
            (= 
                (volume_test_object block hawg3) true
            ) 
            (object_teleport hawg3 unblock)
        ) 
        (if 
            (= 
                (volume_test_object block hawg4) true
            ) 
            (object_teleport hawg4 unblock)
        ) 
        (if 
            (= 
                (volume_test_object block rox) true
            ) 
            (object_teleport rox unblock)
        ) 
        (if 
            (= 
                (volume_test_object block_truck truck) true
            ) 
            (object_teleport truck unblock)
        ) 
        (if 
            (= 
                (volume_test_object block_truck truck2) true
            ) 
            (object_teleport truck2 unblock)
        ) 
        (if 
            (= 
                (volume_test_object block2 hawg) true
            ) 
            (object_teleport hawg unblock2)
        ) 
        (if 
            (= 
                (volume_test_object block2 hawg2) true
            ) 
            (object_teleport hawg2 unblock2)
        ) 
        (if 
            (= 
                (volume_test_object block2 hawg3) true
            ) 
            (object_teleport hawg3 unblock2)
        ) 
        (if 
            (= 
                (volume_test_object block2 hawg4) true
            ) 
            (object_teleport hawg4 unblock2)
        ) 
        (if 
            (= 
                (volume_test_object block2 rox) true
            ) 
            (object_teleport rox unblock2)
        ) 
        (if 
            (= 
                (volume_test_object block_truck2 truck) true
            ) 
            (object_teleport truck unblock2)
        ) 
        (if 
            (= 
                (volume_test_object block_truck2 truck2) true
            ) 
            (object_teleport truck2 unblock2)
        ) 
        (if 
            (= 
                (volume_test_object block3 goose1) true
            ) 
            (object_teleport goose1 unblock3)
        ) 
        (if 
            (= 
                (volume_test_object block3 goose2) true
            ) 
            (object_teleport goose2 unblock3)
        ) 
        (if 
            (= 
                (volume_test_object block3 goose3) true
            ) 
            (object_teleport goose3 unblock3)
        ) 
        (if 
            (= 
                (volume_test_object block3 goose4) true
            ) 
            (object_teleport goose4 unblock3)
        ) 
        (if 
            (= 
                (volume_test_object block4 goose1) true
            ) 
            (object_teleport goose1 unblock4)
        ) 
        (if 
            (= 
                (volume_test_object block4 goose2) true
            ) 
            (object_teleport goose2 unblock4)
        ) 
        (if 
            (= 
                (volume_test_object block4 goose3) true
            ) 
            (object_teleport goose3 unblock4)
        ) 
        (if 
            (= 
                (volume_test_object block4 goose4) true
            ) 
            (object_teleport goose4 unblock4)
        )
    )
)

(script continuous lift 
    (begin 
        (if 
            (= 
                (device_get_position gate) 0
            ) 
            (if 
                (volume_test_objects check 
                    (players)
                ) 
                (device_set_position gate 1)
            ) 
            (begin 
                (sleep 300) 
                (device_set_position gate 0)
            )
        )
    )
)

(script continuous lift2 
    (begin 
        (if 
            (= 
                (device_get_position gate2) 0
            ) 
            (if 
                (volume_test_objects check2 
                    (players)
                ) 
                (device_set_position gate2 1)
            ) 
            (begin 
                (sleep 300) 
                (device_set_position gate2 0)
            )
        )
    )
)

(script continuous garage_door 
    (begin 
        (sleep 30) 
        (if 
            (volume_test_objects garage1 
                (players)
            ) 
            (begin 
                (device_set_position dooor 1) 
                (sleep 10)
            )
        ) 
        (if 
            (and 
                (= 
                    (device_get_position dooor) 1
                ) 
                (not 
                    (volume_test_objects garage1 
                        (players)
                    )
                ) 
                (not 
                    (volume_test_objects close 
                        (players)
                    )
                )
            ) 
            (device_set_position dooor 0)
        )
    )
)

(script continuous breakables_host 
    (begin 
        (if 
            (= is_server true) 
            (begin 
                (sleep 2000) 
                (object_create b) 
                (sleep 10) 
                (object_destroy b)
            ) 
            (sleep -1)
        )
    )
)

(script continuous breakables 
    (begin 
        (if 
            (!= 
                (unit_get_health break) 1
            ) 
            (begin 
                (breakable_surfaces_reset) 
                (sleep 30) 
                (object_create_anew break)
            )
        )
    )
)

(script startup check_if_slayer 
    (begin 
        (object_create d) 
        (sleep 5) 
        (if 
            (!= 
                (unit_get_health n) -1
            ) 
            (set tod 1)
        ) 
        (if 
            (!= 
                (unit_get_health s) -1
            ) 
            (set tod 2)
        )
    )
)

(script continuous nite 
    (begin 
        (sleep 30) 
        (if 
            (= tod 1) 
            (begin 
                (object_teleport d nighty)
            ) 
            (begin 
                (if 
                    (= tod 0) 
                    (begin 
                        (object_teleport d daily)
                    ) 
                    (if 
                        (= tod 2) 
                        (begin 
                            (object_teleport d snowy)
                        )
                    )
                )
            )
        )
    )
)

(script continuous nite_client 
    (begin 
        (sleep 30) 
        (if 
            (!= 
                (unit_get_health night) 1
            ) 
            (begin 
                (switch_bsp 1) 
                (respawn_trees) 
                (object_create_anew day) 
                (object_create_anew snow) 
                (sleep_until 
                    (or 
                        (!= 
                            (unit_get_health day) 1
                        ) 
                        (!= 
                            (unit_get_health snow) 1
                        )
                    )
                )
            )
        ) 
        (if 
            (!= 
                (unit_get_health day) 1
            ) 
            (begin 
                (switch_bsp 0) 
                (respawn_trees) 
                (object_create_anew night) 
                (object_create_anew snow) 
                (sleep_until 
                    (or 
                        (!= 
                            (unit_get_health night) 1
                        ) 
                        (!= 
                            (unit_get_health snow) 1
                        )
                    )
                )
            )
        ) 
        (if 
            (!= 
                (unit_get_health snow) 1
            ) 
            (begin 
                (switch_bsp 2) 
                (respawn_trees) 
                (snow_trees) 
                (object_create_anew night) 
                (object_create_anew day) 
                (sleep_until 
                    (or 
                        (!= 
                            (unit_get_health night) 1
                        ) 
                        (!= 
                            (unit_get_health day) 1
                        )
                    )
                )
            )
        )
    )
)

 

 

Download:

http://pastebin.com/5cYveEvX

WaeV, Tucker933 and Kavawuvi like this

dynamic.png

Share this post


Link to post
Share on other sites

Members of Open Carnage never see off-site ads.

Sorry for the bump. I took a look at this script and it's pretty awesome.

 

A suggestion: I wouldn't rely on the scenario tag being the first tag, as it's not a requirement in Halo's engine. Tool usually compiles it as the first tag, so most maps out there should be fine, though a map protection could easily break this script, or even just a simple hex edit. This is what Halo essentially does for calculating the scenario tag:

local scenario_tag = lookup_tag(read_dword(0x40440004))

 

Tucker933 likes this

Share this post


Link to post
Share on other sites
25 minutes ago, 002 said:

Sorry for the bump. I took a look at this script and it's pretty awesome.

 

A suggestion: I wouldn't rely on the scenario tag being the first tag, as it's not a requirement in Halo's engine. Tool usually compiles it as the first tag, so most maps out there should be fine, though a map protection could easily break this script, or even just a simple hex edit. This is what Halo essentially does for calculating the scenario tag:


local scenario_tag = lookup_tag(read_dword(0x40440004))

 

 

Thanks for reminding me, I read your map file structure document. Never got around to editing it until now.


dynamic.png

Share this post


Link to post
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
Sign in to follow this  
Followers 0
  • Recently Browsing   0 members

    No registered users viewing this page.