-- Compile with --template megalo-zone-template.json. -- Set the template hill position to a reachable place on the intended map. -- Options are sorted by name: goal = 0, interval = 1. alias goal = script_option[0] alias interval = script_option[1] alias pulse = global.timer[0] alias award = global.number[0] on init: do pulse = interval pulse.set_rate(-100%) end award = 0 if pulse.is_zero() then award = 1 pulse = interval pulse.set_rate(-100%) end for each object with label "objective" do for each player do if current_player.is_not_respawning() then if current_object.shape_contains(current_player.biped) then current_player.apply_traits(script_traits[0]) if award == 1 then current_player.score += 1 end end end end end script_widget[0].set_text("Enter the hill; first to %n points", goal) script_widget[0].set_value_text("Next pulse: %n", pulse) script_widget[0].set_visibility(all_players, true) for each player do if current_player.score >= goal then game.end_round() end end