在Inform中,我希望能够创建一个新的动作,并使它能够处理任意文本.
我可以轻松地创建一个可以处理现有事物的新动作.
Finding is an action with past participle found, applying to one thing.
Understand "Find [something]" as finding.
Carry out finding:
say "You find [the noun]."
Run Code Online (Sandbox Code Playgroud)
但这仅适用于游戏世界中存在的项目.例如,如果我尝试"查找fdsljk",它将失败,因为我没有创建"fdsljk".
我希望能够"找到fdsljk",然后能够抓住那些额外的文本并回复它......就像"你找到了fdsljk".
我在想那样的事情
A foo is a kind of value.
Finding is an action with past participle found, applying to one foo.
Understand "Find [something]" as finding.
Carry out finding:
say "You find [the foo]."
Run Code Online (Sandbox Code Playgroud)
可能很接近......但它不起作用.我收到的错误是:
你写了'说'你发现[foo]."',特别是'foo':但是这要求说出一种不能说,或者说是印刷的东西.虽然根据所使用的值的种类使用复杂形式的复杂文本替换会出现此问题,但更常见的是这意味着您尝试使用替换值(例如,在"说"中,表盘读取[V]."')一种无法打印出来的.例如,如果V是一个数字或一段文本,则没有问题:但如果V是解析主题,例如表中"主题"列中的条目,则会出现此问题.
斜体是我的,突出关键...我认为这应该是可行的,但我走的是错误的道路.线索?
再次免责声明,我对Inform 7的体验仅限于您之前提出的问题; - )......我猜你需要一些[text]而不是游戏中的内容[thing]吗?
Finding is an action applying to one topic.
Understand "Find [text]" as finding.
Carry out finding:
say "You find [the topic understood]."
Run Code Online (Sandbox Code Playgroud)