every turn during Scene One:
if player is in 2nd Floor: (a region)
if Scene One has been happening for exactly two turns:
say “Time’s running out!”.
Ok, upon testing, this isn’t firing. I have tested with Scenes on and the scene is definitely running. I’ve checked the map, the naming of the region (2nd Floor), and the locations are confirmed to be within it.
Any ideas, anyone? Should this code be changed? Thanks!
I don’t know if this is the issue but you might want to try
if the location is enclosed by 2nd floor:
I’ve had indirect containment issues with regions before that seem to be solved with “enclosed by”.
Well, that didn’t quite work, but that’s a new one to me and I’ll definitely have to remember that one just in case for future reference.
I think I’ll change the name of the region to “second floor” (no numerals) and see what happens.
Update: I changed the region name from “2nd Floor” to “Second_Floor” with a printed name of “2nd Floor” and now it works perfectly!
So, a little wonkiness with a region with a name starting with a numeral I guess. I didn’t have just one of those actions but rather a string of them and they all fire now.
Thanks again, Hanon, for getting me thinking in the right direction!
Huh that’s weird and seems like it’s probably a bug… unless possibly you have something else named “2nd” or “Floor” or something like that?
Anyway another trick if you’re having trouble with checking whether something is a region is “regionally in.” Basically if you’re checking a specific named region, the compiler knows that “in” means “enclosed in a room that’s part of the region,” but if it’s a variable or something, it doesn’t, and you can force that reading with “regionally in.” I think this is the same thing you’re accomplishing with “if the location is enclosed by [regionname]”. See §6.11 of Writing with Inform.
That’s quite possible. I’d have to check. I’m nearing the end of this WIP, I see a light at the end of the tunnel, but that means I have a giant Jenga tower of code that resembles the Egyptian Book of the Dead.