intfiction.org

The Interactive Fiction Community Forum
It is currently Mon Dec 10, 2018 2:45 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Mon Sep 03, 2018 11:02 pm 
Offline

Joined: Sun Aug 19, 2018 3:04 pm
Posts: 20
Hey, y'all!

I'm working on a project in which you must cook uncooked pasta on a stove in a cooking pot. I want to make "cook" and "cooking" something that can be done only when a stove is present. I'm trying to make it so that the player must specifically "cook pasta in pot" with a stove present, say "what would you like to cook pasta with?" if they don't specify "pot", and make any other combination of items say "This would be pointless". And "uncooked pasta" should become "cooked pasta" at the end.

Thanks for your help!!


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Sep 03, 2018 11:51 pm 
Offline
User avatar

Joined: Sun May 21, 2017 4:59 pm
Posts: 301
Location: Michigan
Maybe something like this (could be cleaned up and made tighter):

Code:
Cookware is a kind of thing.

Cooking it with is an action applying to two things. Understand "cook [something] in [something]" as cooking it with.

Check cooking it with:
   if the noun is not Pasta:
      say "This game is about cooking pasta, not cooking [a noun]! Don't be a fool!";
      stop the action;
   if the second noun is not cookware:
      say "You can't cook with [the second noun]! Are you insane?";
      stop the action.

Carry out cooking it with:
   if the stove is touchable and the second noun is the pot:
      say "You cook [the noun] in [the second noun]! Hot!";
      say "You put the wet noodles in your pocket.";
      now Pasta is nowhere;
      now the player has cooked pasta;
   else:
      say "There's no stove here, numbskull. Get thee to a kitchen.".
      
The kitchen is a room. The player is in The Kitchen.
The bedroom is north of the kitchen.

The stove is scenery in the kitchen.
A hat is in the kitchen.
The pot is cookware on the stove.
Pasta is a thing in the kitchen.
Cooked Pasta is an edible thing.



Output Sample:

Code:
kitchen
You can see a stove (on which is a pot), a hat and Pasta here.

>get pot, hat, pasta
pot: Taken.
hat: Taken.
Pasta: Taken.

>look
kitchen
You can see a stove here.

>n

bedroom

>cook pasta in pot
There's no stove here, numbskull. Get thee to a kitchen.

>s

kitchen
You can see a stove here.

>cook hat in pot
This game is about cooking pasta, not cooking a hat! Don't be a fool!

>cook pasta in hat
You can't cook with the hat! Are you insane?

>cook pasta in pot
You cook Pasta in the pot! Hot!
You put the wet noodles in your pocket.

>i
You are carrying:
  Cooked Pasta
  a hat
  a pot

_________________
~~~
My ebooks on Amazon
My ebooks on Smashwords


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Sep 04, 2018 6:29 pm 
Offline

Joined: Sun Aug 19, 2018 3:04 pm
Posts: 20
howtophil wrote:
Maybe something like this



You, my good sir, are a god. Even your writing style matches mine quite well, I'm honestly very impressed!!

Thanks a billion for your help. Keep up the fantastic writing!!


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Sep 04, 2018 7:12 pm 
Offline
User avatar

Joined: Sun May 21, 2017 4:59 pm
Posts: 301
Location: Michigan
Glad to help and glad you dig my style :)

_________________
~~~
My ebooks on Amazon
My ebooks on Smashwords


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Sep 04, 2018 7:23 pm 
Offline

Joined: Sun Aug 19, 2018 3:04 pm
Posts: 20
howtophil wrote:
Glad to help and glad you dig my style :)


Hold the heck on, I'm an idiot! You're HowToPhil!! I've been a fan of your stuff for a while! Your guides have helped me, and Getting to Work is what got my into Inform 7 in the first place!

Thank you for all of your amazing hard work. Great to meet ya!


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Sep 04, 2018 9:43 pm 
Offline
User avatar

Joined: Sun May 21, 2017 4:59 pm
Posts: 301
Location: Michigan
ShurikenKat wrote:
howtophil wrote:
Glad to help and glad you dig my style :)


Hold the heck on, I'm an idiot! You're HowToPhil!! I've been a fan of your stuff for a while! Your guides have helped me, and Getting to Work is what got my into Inform 7 in the first place!

Thank you for all of your amazing hard work. Great to meet ya!


Rock! :) It's good to know those guides help people out :)

Getting To Work And Other Bullshit is a fun side project. :) I piece it together as I learn inform 7. :)

I recenlty added "Specious Park" north of the crawling skeleton. :)

Quote:
Specious Park
You probably think I mean "spacious park" but I don't. This is a questionable little park. The trees outside of the main trails (leading north, south, east, and west) are packed so tightly that you can't even imagine fitting a hand between them. You'll have to stick to the trails.

>n
Specious Park
You think you might be lost. This place looks smaller on the outside...

>n
Specious Park
This reminds you of one of those old 8 bit games... it came on a gold colored cartridge...

>n
Specious Park
What was that game? Zardoz? Link? The Adventure of Canon?


It's a bit of nostalgiac reference to the Lost Woods in the original Zelda. The way out of the park is the same as the way out of the Lost Woods. ;)

There's some fleshing out and a possible table to keep track of "where" things are dropped in the maze (since it's really one looping room) that needs to happen. Maybe I'll have a pixie drop everything the player drops back out on the sidewalk...

_________________
~~~
My ebooks on Amazon
My ebooks on Smashwords


Top
 Profile Send private message  
Reply with quote  
PostPosted: Wed Sep 05, 2018 3:55 pm 
Offline

Joined: Sun Aug 19, 2018 3:04 pm
Posts: 20
howtophil wrote:
It's a bit of nostalgiac reference to the Lost Woods in the original Zelda. The way out of the park is the same as the way out of the Lost Woods. ;)

There's some fleshing out and a possible table to keep track of "where" things are dropped in the maze (since it's really one looping room) that needs to happen. Maybe I'll have a pixie drop everything the player drops back out on the sidewalk...


Brilliant XD

I love LoZ, glad to see fans keeping such an amazing series alive. Keep rocking on that game, it's seriously a joyride all the way through. So many fun bits and pieces.


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

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Majestic-12 [Bot] and 19 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