restricting player movement for the first five minutes

Hi folks, first let me say how impressed I am with all the contributions I’ve seen so far on this site.

Two things strike me as almost unbelievable about this site so far…

  1. Everyone seems to be polite and get along even when they disagree.

  2. You really can ask a lazy, banal, brain-dead, and generally tired basic question without being skewered by several people.

I’m a member of a forum dedicated to South Carolina High School football and as you can imagine with a bunch of beer swilling
red-necks with their favorite teams competing against each other, it’s usually one big monkeysh*t fight from week to week.

Intelligence, patience, and moderation are in short supply on that forum so I must say what a breath of fresh air it is to have found
this forum recently.

I stumbled across I7 on google and thought it’d be fun to try with my 8 year old but I have to admit that I’m finding
a lot of I7 terribly cryptic. Not so much in it’s logic but the actual syntax of the system. The code that I try to write that doesn’t compile makes logical sense I think but I don’t understand the exact syntax that I need to use (though I suspect that I’m close.)

For instance when I tried to get the program to output the time I just used [time] and discover later that it had to be [time of day]. In some respects I do prefer the nuts and bolts approach of other languages because I get less errors that way but it does seem to take WAY more code in another language to do what a little bit of I7 code can do. The problem that I find is that I7 is less like talking to a computer and more like talking to my wife if you know what I mean…I know what I wanna say and there’s a way to say it so it will be understood but I’ll be damned if I can figure it out! Sometimes I think I should just take I7 on the Dr. Phil show.

That’s why I came to you guys. I’ll just consider you guys marriage counselors if it’s all the same to you.

But I digress…

Here’s the (what I consider) insanely simple problem that I can’t seem to solve and I’ve searched the documentation, several tutorials, and this forum with no luck yet…

I just want the player to lay on the bed and not be able to get up for the first five minutes.

I was able to restrict him to the bed finally with a statement like…

Instead of doing anything other than looking, examining, or searching: say "You're too tired to get out of bed."

I’ve since deleted the code so I’m just going from memory what I typed but it was something like that and it worked fine except that I don’t know how to be able to let the player get up after the first five minutes.

I think I tried something like this…

While time of day < 9:05 am: Instead of doing anything other than looking, examining, or searching: say "You're too tired to get out of bed."
The error is…
Problem. You wrote ‘While time of day < 9:05 am’ : but the punctuation here ‘:’ makes me think this should be a definition of a phrase and it doesn’t begin as it should, with either ‘To’ (e.g. ‘To flood the riverplain:’), ‘Definition:’, a name for a rule (e.g. ‘This is the devilishly cunning rule:’), ‘At’ plus a time (e.g. ‘At 11:12 PM:’ or ‘At the time when the clock chimes’) or the name of a rulebook, possibly followed by some description of the action or value to apply to (e.g. ‘Instead of taking something:’ or ‘Every turn:’).

I imagine I could do something like
At 9:05 am:
(some statement that would undo my earlier statement about restricting the player to the bed)
but again I just don’t know what to say in the code.

Thanks for any help. The format at this forum alone is enough I think to keep me at it with I7 if for no other reason than to get a break from the knuckleheads on other forums. (Especially during the fall!)

You have to put the condition inside the instead rule:

Instead of doing anything other than looking, examining, or searching when time of day is less than 9:05 AM: say "You're too tired to get out of bed."
That said it might be better to use some other approach: this rule assumes that a) the game starts at 9:00 AM and b) the game will end before the next day (otherwise the same restriction will apply again) and if either of those assumptions change you have a bug. You probably want to tell the player when they can move around again, so you could create a scene that gives a mechanism for both the restriction and announcing when it’s lifted:

[code]Bedroom is a room. Too tired is a scene. Too tired begins when play begins. Too tired ends when time since too tired began is 5 minutes.

Instead of doing anything other than looking, examining, or searching when too tired is happening:
say “You’re too tired to get out of bed.”

When too tired ends:
say “Ok, you feel like you’ve rested enough.”

Test me with “jump/jump/jump/jump/jump/jump”.[/code]

Thanks so much. That definitely does the trick and the advice about using scenes makes sense. I’d have surely experience the bug the next day like you said. I’ve never seen those commands till now and didn’t think to look in the “Scenes” section for the answer.