-- Compile directly with mode-compile; no JSON object bindings are required. -- Each life gets a miniature shotgun, attached to the player for five -- seconds before it drops into the world. Halo 3 must supply the weapon tag. alias gift = player.object[0] alias previous_body = player.object[1] alias stage = player.number[0] alias release_time = player.timer[0] declare player.timer[0] = 5 declare global.timer[0] = 60 on init: do global.timer[0].set_rate(-100%) end for each player do if current_player.is_not_respawning() then if current_player.previous_body != current_player.biped then current_player.previous_body = current_player.biped current_player.stage = 0 end if current_player.stage == 0 then current_player.gift = current_player.biped.place_at_me(shotgun, "gift", never_garbage_collect, 0, 0, 5, none) current_player.gift.set_scale(50) current_player.gift.set_invincibility(true) current_player.gift.attach_to(current_player.biped, 0, 0, 5, relative) current_player.release_time.reset() current_player.release_time.set_rate(-100%) current_player.stage = 1 end if current_player.stage == 1 and current_player.release_time.is_zero() then current_player.gift.detach() current_player.gift.set_invincibility(false) current_player.gift.set_velocity(0, 1, 0) current_player.stage = 2 end end end global.number[0] = 0 for each object with label "gift" do global.number[0] += 1 end script_widget[0].set_text("Scripted gifts: %n", global.number[0]) script_widget[0].set_visibility(all_players, true) if global.timer[0].is_zero() then game.end_round() end