hello i been trying to create a thing for my game .
i wanted to make something happen at a different time but also with a condition…
or whatever i should call it.
like this:
i tried if, when, while all of them didnt work…
is there a way to make this possible. [i said pan cause the batter for the dessert is on a pan lol]
sorry about the time confusion didnt really plan the time course yet so i was just guessing of what time will be used
Two things:
when you specify a time in a rule like this, you have to say AM or PM.
Also, these “At [time]” rules are special. You can’t put extra conditions on them, you have to just have a time (or a future event that you’ve named in a different rule, as in §9.11 of the documentation.)
So putting it together, this should work:
at 5:06 PM:
if the pan is in the oven:
say "the dessert should be done baking."
Also, I made a copy-paste error in my original post that I only just noticed. There should only be one “say” statement there. I’m going back to edit the original post.
Matt’s already solved the issue, but I just wanted to comment on this since it might help new I7 authors. Punctuation is incredibly important in I7 (as in most computer languages). The difference between using a colon — such as after a rule is being declared (e.g. “at 5:06 PM:”) — or a semi-colon (some code inside a rule) is the difference between code compiling or not. Writers will have a tendency to code something like:
Every turn: say, “Blah.”
because using the comma in that manner is the way they were taught to write in English. The problem is that comma kills the whole thing because it has a very specific meaning in I7. Basically, just watch your punctuation — it’s amazing how many errors you will catch.