intfiction.org

The Interactive Fiction Community Forum
It is currently Wed May 22, 2013 6:52 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Sun Mar 10, 2013 6:15 pm 
Offline
User avatar

Joined: Wed Feb 20, 2013 3:15 pm
Posts: 7
Code:
If player has not entered tent for one turn:
   say "There was was a horrible storm that night. The rain was falling so hard and flashes of lightning were everywhere that you feel into a muddy sink hole and died.";
END THE GAME IN DEATH.


Thank you for your help but whats going on now is that when I start the game (I start it in a forest, then go to a marsh AND THEN I go to the field where I have included the code) it lets me play for only three turns and I havent even gotten out of the field yet. So how do I make the code only work in the field?


Last edited by cats8827 on Wed Mar 13, 2013 2:39 pm, edited 1 time in total.

Top
 Profile Send private message  
 
PostPosted: Sun Mar 10, 2013 7:08 pm 
Offline

Joined: Tue Mar 09, 2010 2:34 pm
Posts: 2128
Location: Burlington, VT
You can't just leave a conditional out there on its own like that; this sort of thing has to start with a rule header, probably "Every turn." (Other rule headers would be things like "Instead of going north in the campground," "Before looking," "Checking taking the tent," like that. The chapter of the documentation on Basic Actions is useful here, and section 9.5 on Every Turn.)

If you fix that, though, you'll find that Inform doesn't understand "Player has not entered the tent for one turn." It looks as though you might be trying to use a formulation like the past and perfect tenses from sections 9.12 and 9.13 of the documentation, but for that you need "We have...." and not "Player has...."

Even so, "Every turn when we have not entered the tent for one turn," though it compiles, doesn't do anything. I'm not sure why, not being awfully confident around this kind of formulation. But you can make it work by relying on the turn count (assuming you want this to happen at the beginning of the game):

Code:
Campground is a room.
The tent is an enterable container in campground.
Every turn when the turn count is greater than 1 and we have not entered the tent:
   say "There was a horrible storm that night. Flashes of lightning were everywhere and the rain was falling so hard that you fell into a muddy sink hole and died.";
   end the game in death.


Of course this doesn't prevent the player from leaving the tent again. (By the way, this will compile even if you don't indent "end the game in death," since this doesn't have any if-thens inside the rule, but it's probably nice to get into the habit of indenting everything so it's one level in from the thing it's conditional on.)


Top
 Profile Send private message  
 
PostPosted: Sun Mar 10, 2013 7:17 pm 
Offline
User avatar

Joined: Wed Sep 01, 2010 1:50 am
Posts: 784
Location: Sydney, Australia
Anyone get the feeling that there has been a huge increase in leg-pulling coding requests lately?

- Wade


Top
 Profile Send private message  
 
PostPosted: Sun Mar 10, 2013 8:29 pm 
Offline

Joined: Tue Mar 09, 2010 2:34 pm
Posts: 2128
Location: Burlington, VT
I don't see any reason to think this is leg-pulling. It's a pretty common mistake to make when you're first learning I7.

(This has inspired me to look up ilovemyhedgehog's progress -- it looks like she got around to asking for testers but it never appeared. Pity, I wanted to see where she was going with it.)


Top
 Profile Send private message  
 
PostPosted: Sun Mar 10, 2013 9:03 pm 
Offline
User avatar

Joined: Wed Sep 01, 2010 1:50 am
Posts: 784
Location: Sydney, Australia
I would say I see some reasons ("END THE GAME IN DEATH") but like in many a topic that I think might be leg-pulling, I of course have no way to really know :)

There was the question about George Lucas ("I can't seem to get my character to talk to George Lucas."), gnusurferdude's topic where it seemed I was paralysed until I opened my eyes while lying on the beach ("You smell what you believe to be the tropical scent of coconuts and sea salt.") and now this one has me feeling into a muddy hole and dying after 2 moves.

If they aren't pulling my leg, they are at least entertaining me as I learn.

- Wade


Top
 Profile Send private message  
 
PostPosted: Sun Mar 10, 2013 9:25 pm 
Offline
User avatar

Joined: Sat May 08, 2010 9:25 pm
Posts: 959
Location: The Seattle Massive
I suspect that this is a special variety of Poe's Law.


Last edited by maga on Mon Mar 11, 2013 8:33 am, edited 1 time in total.

Top
 Profile Send private message  
 
PostPosted: Sun Mar 10, 2013 9:37 pm 
Offline
User avatar

Joined: Wed Sep 01, 2010 1:50 am
Posts: 784
Location: Sydney, Australia
Hm, I hadn't heard of that one before.

Well, it sounds like what I'm experiencing. Once I felt I was starting to see leg-pullings, I started seeing them everywhere. I've had an itch to say something for weeks.

- Wade


Top
 Profile Send private message  
 
PostPosted: Mon Mar 11, 2013 8:55 am 
Offline

Joined: Tue Mar 09, 2010 2:34 pm
Posts: 2128
Location: Burlington, VT
I don't know, these all just strike me as things novice I7 authors might try. This was a leg-pulling coding request:

Quote:
Back-glimmering is an action applying to one number. Understand
"undelay [number] glimmer" as back-glimmering.

Carry out back-glimmering:
say "You feel a faint, reflective tingle...";
let N be the number understood;
The room lights up N turns ago.


(I'm embarrassed to remember how long I got trolled by that one.)


Top
 Profile Send private message  
 
PostPosted: Mon Mar 11, 2013 9:33 am 
Offline
User avatar

Joined: Thu Nov 04, 2010 6:30 am
Posts: 986
Location: Gothenburg, Sweden
matt w wrote:
ilovemyhedgehog's progress -- it looks like she got around to asking for testers but it never appeared. Pity, I wanted to see where she was going with it.

I playtested a version of the beginning of her game. It was not at all bad. A mystery puzzle thing starting in an abandoned laboratory where sinister experiments had been conducted on you and a couple of animals. It seems that the idea was that you would have been able to switch minds with some of the animals in order to solve some of the puzzles and then flog a literal dead horse to life somewhere along the line. There was a certain nice creepiness over it. But the plot called for a few pretty advanced things and probably a full-length text adventure with attention to lots of details; so I suppose it just seemed too overwhelming in the end. But, yes, it's a pity.

_________________
Man ska inte tro allt man tänker.


Top
 Profile Send private message  
 
PostPosted: Mon Mar 11, 2013 11:37 pm 
Offline

Joined: Sun Dec 05, 2010 11:07 am
Posts: 321
Location: ኢትዮጵያ
severedhand wrote:
Hm, I hadn't heard of that one before.

Well, it sounds like what I'm experiencing. Once I felt I was starting to see leg-pullings, I started seeing them everywhere. I've had an itch to say something for weeks.

- Wade

It might just be people changing details from their code to simplify their example/anonymize their project, and replacing it with silliness, because, why not? I've done that before.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Jim Aikin, wintersolstice and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group