intfiction.org

The Interactive Fiction Community Forum
It is currently Tue Aug 21, 2018 4:35 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Jun 14, 2018 5:43 pm 
Offline

Joined: Mon Jun 11, 2018 7:47 pm
Posts: 10
I need certain actions be only usable during specific scenes and I'm talking about aliases to the default commands, not the completely custom actions so hacking it with check/carry out/report won't work in that case. For example I've set it up that player can "warn" certain character which amounts to "telling him about danger", but I only want the action to be usable in certain scene. Unfortunately Inform balks at the code like this:
Code:
If the Scene is happening:
   Understand "warn [someone]" as telling them about "danger".


It wouldn't make sense for people in other scenes to be warned about anything and as such I want limit certain commands/aliases to specific scenes. How to do that?


Top
 Profile Send private message  
Reply with quote  
PostPosted: Thu Jun 14, 2018 6:58 pm 
Offline

Joined: Sat Jan 23, 2010 4:56 pm
Posts: 5719
You can't do it in one line, but you can do something like this:

Code:
Warning is an action applying to one thing.
Carry out warning:
   [...do something...]
   
Understand "warn [someone]" as warning when Foo is happening.


However, this is generally bad practice. If a player tries "warn" during a different scene and gets an "I didn't understand that" error, they're not going to try it again -- the game is telling them that that verb isn't recognized.

Instead, define the "warn" verb (and action) for the whole game, and write check/instead rules which give an appropriate refusal when it's the wrong time.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Thu Jun 14, 2018 8:20 pm 
Offline
User avatar

Joined: Tue Nov 08, 2011 8:11 am
Posts: 2531
Location: US - Central
I could see a legit use for not understanding an action in part of a game - say halfway through story the player is instructed in magic-use - that would be a reasonable situation for the parser (and the PC) not to understand any of the spellcasting vocabulary until the correct moment in the story after the verbs are spelled out to the player.

_________________
http://hanonondricek.wixsite.com/pyramidif
https://pyramidif.itch.io/


Top
 Profile Send private message  
Reply with quote  
PostPosted: Thu Jun 14, 2018 9:25 pm 
Offline

Joined: Sat Jan 23, 2010 4:56 pm
Posts: 5719
Sure, that's why I said "generally". :) You'd want to think about whether the protagonist should be *aware* of magic-use at the beginning of the game.

I thought Enchanter was an example of this, but in fact it "leaks" information about spells you haven't found yet:

Quote:
>exex me
The exex spell is not committed to memory, and you haven't seen any scroll on which it is written.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Jun 18, 2018 6:27 am 
Offline

Joined: Sat Oct 17, 2015 5:48 am
Posts: 67
:idea: now the obligatory xyzzy homage changes with scene

(sorry for the little jab in writing my idea in fake-I7 ;) )

Best regards from Italy,
dott. Piergiorgio.


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: Bing [Bot] and 7 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