Tutorial script doesn't work

Started by FeLu, March 20, 2023, 10:15:46 AM

Previous topic - Next topic
Hi folks,

I'm new to all fo this and at the moment, I'm learning Solarus by watching the tutorials on Youtube. Im am now at the tutorial for switches and mechanisms (https://www.youtube.com/watch?v=CbMfXsHvUxg&list=PLzJ4jb-Y0ufwkbfy49F_NrLtxCAiGJw5r&index=17&t=934s) and there is a script that doesn't work and I don't know why.

The script I am talking about is for when a switch let's a chest appear, you open the chest and when you leave the room it should stay activated , so that the switch can't be activated again and the chest is (when opened) present. I use the exact script as in the video (double checked twice) but when I run the quest it doesn't work. When I leave the map and come back the switch is still unactivated and the chest is not there. The state of the chest is saved and when I use it again the chest appears opened, but that's not what the script shall do. I have no clue why it doesn't work.
To clarify: This is my test quest and I am aware that I may have made some mistake elsewehere but I can't tell.
Maybe you guys have some ideas what to do?