Inform7如何修改已定义命令含义 将clean从rub关联改为wash关联
你遇到的报错是因为Inform7不允许直接给已经绑定过动作的命令重复分配新动作,必须先解绑原有绑定再重新关联,操作方法如下:
- 先用
Understand the command "clean" as something new.语法解除clean命令和rub动作的原有绑定,这一步只会清除clean的原有映射,rub的其他同义词(shine、polish、sweep等)以及rub的所有规则都完全不受影响。 - 再按照你原本的逻辑定义
washing动作并绑定clean命令即可。
完整可运行的代码示例:
Understand the command "clean" as something new. Understand "wash [something] with [something]" as washing. Understand the command "clean" as "wash".
内容的提问来源于stack exchange,提问作者HappyDog
相关产品推荐
相关产品推荐

