Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carousel, highlights and start game not working. #17

Closed
Pucksnok opened this issue Nov 22, 2024 · 4 comments
Closed

Carousel, highlights and start game not working. #17

Pucksnok opened this issue Nov 22, 2024 · 4 comments

Comments

@Pucksnok
Copy link

Pucksnok commented Nov 22, 2024

Hello.
I have an issue when using carousel mode with attract. When I use carousel in attract mode I can't start a game, usually it gives some error but here it's nothing. I do see that the switch is active and correctly named. If I exclude the carousel parts it can start game and starts the base mode without any issues.

I have tried replacing the addons folder.
I have tried do a completely new attract.yaml and attract.tscn
I have tried an attract scene with only a background but still using the carousel active in attract.yaml.
I have tried to use files for carousel provided by Atummons on the Trident Pinball discord, see files in zip.
attract.zip

What I also see is that the old carousel highlights isn't working.

event_player:
carousel_MPFSlide_highlighted: test_event
carousel_MPFSlide2_highlighted: test_event2
carousel_MPFSlide3_highlighted: test_event3

None of the events are posted when doing highlight like in 0.54.

My switch works, I see it in both the graphical interface of mpf and the logs/text prompt.

switches:
s_start_button:
number: 3-0-21
tags: start
s_start_button shows up as active in both mpf logs and the gmc output. I also see it being pressed if I use the graphical ui of mpf.

Is this some bug or am I just stupid? I have done what I can to do everything as basic as possible in my code replacing everything in my attract and base mode, makes no difference, all I can do is to skip the carousel.

Sorry for that the code looks wrong, it looks correct in my windows but not when posted.

Cheers.

@Pucksnok
Copy link
Author

Pucksnok commented Nov 22, 2024

Godot v4.3.stable.official [77dcf97d8]
Mission Pinball Framework v0.80.0.dev5

I downloaded new addons folder today to test, no difference.

@avanwinkle
Copy link
Contributor

Hello Gill!

Attract mode has some special functionality related to starting games, so your mode must inherit from the Attract code, not the Carousel code.

MPF provides default configs for the key modes like attract, so the easiest thing to do is just remove the mode: section from your attract.yaml file and let the defaults work. If you prefer to have your own mode: section, then change the code line to use the Attract code:

code: mpf.modes.attract.code.attract.Attract

Note that the Attract mode inherits from Carousel, so all of your carousel setup will still work after you switch. This is a recent change—previously, users had to create one main attract mode for the attract functionality and a concurrent attract carousel for the carousel functionality. But you're on 0.80.dev5 which has the change, hurray!

@avanwinkle
Copy link
Contributor

As for the carousel item highlights, those are changed in 0.80 to use a single standard event item_highlighted and arguments to identify the carousel (mode name) and the item. So if your mode name is "attract" and your highlighted item is "MPFSlide2", you should see an event in your logs like this:

item_highlighted{carousel: 'attract', direction: 'forward', item: 'MPFSlide2'}

@Pucksnok
Copy link
Author

Thank you! I removed "code: mpf.modes.carousel.code.carousel.Carousel" and it now works again. highlight also works. Much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants