-- Halo 3's Megalo extensions for what players carry and ride, vehicles, -- hits on objects, tag paths, copies, objective items, and where objects -- are and which way they face. -- -- At your first spawn a training dummy (an Elite's body) stands in front -- of you: melee does it no harm, but every hit on it counts, by kind. A -- rusty barrel, made from its tag path, stands beyond it on your left, and -- a copy of it turned 45 degrees on your right. Ten seconds in, a Mongoose -- made where you stand takes you for a ride; ten seconds later you die, -- and from then on you respawn in a Mongoose of your own. (A tag path -- names only what the map loads, and the engine makes nothing outside the -- map: on a narrow spawn, place things ahead or behind.) alias dummy = player.object[0] alias barrel = player.object[1] alias copy = player.object[2] alias ride = player.object[3] alias stage = player.number[0] alias melee_hits = player.number[1] alias bullet_hits = player.number[2] alias other_hits = player.number[3] alias ride_time = player.timer[0] alias barrels = global.number[0] alias flags = global.number[1] declare player.timer[0] = 10 on object damaged: do if current_object == current_player.dummy then if damage_category == damage.melee then current_player.melee_hits += 1 altif damage_category == damage.bullet then current_player.bullet_hits += 1 alt current_player.other_hits += 1 end end end for each player do if current_player.is_not_respawning() then if current_player.stage == 0 then current_player.dummy = current_player.biped.place_at_me(elite, "dummy", none, 6, 0, 0, none) current_player.dummy.set_damage_from(damage.melee, false) current_player.barrel = current_player.biped.place_at_me("objects/gear/human/industrial/h_barrel_rusty/h_barrel_rusty", "barrel", none, 20, 3, 5, none) current_player.copy = current_player.biped.place_at_me(current_player.barrel, "barrel copy", none, 20, -3, 5, none) current_player.copy.set_rotation(45, 0, 0) current_player.ride_time.reset() current_player.ride_time.set_rate(-100%) current_player.set_respawn_vehicle("objects/vehicles/mongoose/mongoose") current_player.stage = 1 end if current_player.stage == 1 and current_player.ride_time.is_zero() then current_player.ride = current_player.biped.place_at_me(mongoose, "ride", none, 0, 0, 0, none) current_player.force_into_vehicle(current_player.ride) current_player.ride_time.reset() current_player.ride_time.set_rate(-100%) current_player.stage = 2 end if current_player.stage == 2 and current_player.ride_time.is_zero() then current_player.stage = 3 current_player.biped.kill(false) end end end barrels = 0 flags = 0 for each object do if current_object.is_of_type("objects/gear/human/industrial/h_barrel_rusty/h_barrel_rusty") then barrels += 1 end if current_object.is_of_type(flag) then flags += 1 end end for each player do temporaries.object[0] = current_player.get_weapon(primary) temporaries.number[0] = 0 if temporaries.object[0].is_of_type(assault_rifle) then temporaries.number[0] = 1 end temporaries.number[1] = 0 if current_player.is_driver() then temporaries.number[1] = 1 end script_widget[0].set_text_for(current_player, "Dummy hits: melee %n, bullet %n, other %n", current_player.melee_hits, current_player.bullet_hits, current_player.other_hits) script_widget[1].set_text_for(current_player, "Dummy health %n, barrels %n, flags %n", current_player.dummy.health, barrels, flags) script_widget[2].set_text_for(current_player, "Copy faces %n, you stand at %n %n", current_player.copy.get_yaw(), current_player.biped.get_x(), current_player.biped.get_y()) script_widget[3].set_text_for(current_player, "Seat %n, driving %n, rifle in hand %n", current_player.get_seat(), temporaries.number[1], temporaries.number[0]) end script_widget[0].set_visibility(all_players, true) script_widget[1].set_visibility(all_players, true) script_widget[2].set_visibility(all_players, true) script_widget[3].set_visibility(all_players, true)