Skip to content

Integrating Logic_Blocks and Slides

Related Config File Sections:

You might want to show the count of your counter on a slide. Unfortunately, MC currently cannot subscribe on the value of your counter. However, you can use variable_player to set the value of your counter to a player variable and then use that variable in your slide.

This is an example:

#config_version=5

##! mode: my_mode
counters:
  my_counter:
    starting_count: 0
    count_complete_value: 5
    count_events: count_up

variable_player:
  counter_my_counter_hit:
    my_counter:
      action: set
      int: (count)

slide_player:
  show_slide:
    widgets:
      - type: text
        text: "Count (player|my_counter)"

##! test
#! start_game
#! start_mode my_mode
#! post show_slide
#! advance_time_and_run .1
#! assert_text_on_top_slide "Count 0"
#! post count_up
#! advance_time_and_run .1
#! assert_text_on_top_slide "Count 1"
#! post count_up
#! advance_time_and_run .1
#! assert_text_on_top_slide "Count 2"
#! post count_up
#! advance_time_and_run .1
#! assert_text_on_top_slide "Count 3"
#! post count_up
#! advance_time_and_run .1
#! assert_text_on_top_slide "Count 4"

Something missing or wrong? You can fix it!

This website is edited by people like you! Is something wrong or missing? Is something out of date, or can you explain it better?

Please help us! You can fix it yourself and be an official "open source" contributor!

It's easy! See our Beginner's guide to editing the docs.

Page navigation via the keyboard: < >

You can navigate this site via the keyboard. There are two modes:

General navigation, when search is not focused:

  • F , S , / : open search dialog
  • P , , : go to previous page
  • N , . : go to next page

While using the search function:

  • Down , Up : select next / previous result
  • Esc , Tab : close search
  • Enter : go to highlighted page in the results