DocsMegalithGetting started

Make your first change

  1. Slow it downChange declare interval = 1 to declare interval = 2. Points now arrive every two seconds.
  2. Let hosts choose the lengthAdd a setting to the header, name it in the script, and use it in place of the 60:
    my-first-mode.rmeg, with a setting
    --[=[ mode
    name = "My First Mode"
    
    [logic.options]
    intervals = { value = 30, min = 5, max = 300 }
    ]=]
    
    alias intervals = script_option[0]
    alias interval = global.timer[0]
    alias elapsed = global.number[0]
    declare interval = 2
    
    on init: do
       interval.set_rate(-100%)
    end
    
    if interval.is_zero() then
       for each player do
          if current_player.is_not_respawning() then
             current_player.score += 1
          end
       end
       elapsed += 1
       interval.reset()
       interval.set_rate(-100%)
    end
    
    script_widget[0].set_text("Intervals: %n of %n", elapsed, intervals)
    script_widget[0].set_visibility(all_players, true)
    
    if elapsed >= intervals then
       game.end_round()
    end
  3. Reload itSave the file, choose Refresh and select the mode again: the lobby keeps the copy it loaded, and a round that's running keeps the script it started with.
  4. Change the settingIn Game Options, open Slayer Rules. intervals is listed under Custom Mode Options, on a track from 5 to 300. Save as Variant keeps your choice in a new file.

Change one rule at a time and check its result before building a larger mode. To play in teams, add "rounds.teams" = 1 under [options] in the header. Team scores add up their players' points, so a team with more living players earns faster.