intfiction.org

The Interactive Fiction Community Forum
It is currently Sat Feb 23, 2019 4:56 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Tue Feb 05, 2019 9:02 am 
Offline

Joined: Sat Feb 13, 2016 6:26 pm
Posts: 168
How can we get a noun (meaning in a text sentence, not a "thing") to adapt to singular or plural, depending on what has come before?

For example:
Code:
"[We] [turn] into [if___]a werewolf[or]werewolves[end if]."


what is the correct "if..." condition to write?

I tried "[if the item described is plural-named]..." but it did not give the expected results.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Feb 05, 2019 12:39 pm 
Offline

Joined: Tue Mar 09, 2010 2:34 pm
Posts: 5568
Location: Burlington, VT
The term you need for this is "prior named object":

Code:
Lab is a room.

Some pants are in the lab. A rock is in the lab.

Instead of examining something: say "[The noun] [aren't] [if the prior named object is plural-named]werewolves[otherwise]a werewolf[end if]."


(For some reason this disappeared from the latest documentation, except in example 251.)

(Also in this case it only looks like you need to worry if the player might be a plural-named thing.)


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Feb 05, 2019 1:28 pm 
Offline

Joined: Fri Oct 18, 2013 10:13 am
Posts: 2692
Location: The Midwest
I don't have the docs with me right now, but isn't there also "if the naming context is plural", which handles numbers and such automatically?

_________________
Daniel Stelzer


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Feb 05, 2019 1:33 pm 
Offline

Joined: Sat Jan 23, 2010 4:56 pm
Posts: 5921
That's not familiar. Maybe it's from an extension?


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Feb 05, 2019 4:43 pm 
Offline

Joined: Sat Feb 13, 2016 6:26 pm
Posts: 168
Yes! Thank you!

Quote:
matt w:
(Also in this case it only looks like you need to worry if the player might be a plural-named thing.)

Poor example, I guess. But you get the point. :D


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

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Baidu [Spider] and 15 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