Allow reuse

The *allow_reuse command is only used to counter an overriding *hide_reusearrow-up-right command at the top of a scenearrow-up-right. allow_reuse命令仅用于抵消场景顶部覆盖性的hide_reuse命令。

Usage 用法

The *hide_reuse command, if used at the top of a scene without indentation (as seen in the example below), prevents any *choice options -- anywhere in this same scene -- from being selected a second time in those instances where your scripting loops back (*goto home in the example below) to again display the same *choice list.

hide_reuse命令若在场景顶部无缩进使用(如下方示例所示),将阻止同一场景内任何choice选项——当脚本循环返回(如下方示例中的goto home)以再次显示相同choice列表时——被二次选择。

However, in those cases where you do intend for a particular choice option to be selectable more than once regardless, preceding that option with allow_reuse will enable this, as in the following example: 然而,在那些你确实希望某个choice选项无论何时都能被重复选择的情况下,在该选项前使用allow_reuse即可实现此功能,如下例所示:

*hide_reuse

*label Home

What do you want to do next?
*choice

    *allow_reuse #Eat some food.

        You eat some food and feel refreshed.

        *goto Home

    #Sleep.

        You're not tired enough!

        *goto Home

    #Go outside.

        It's raining outside so you decide to stay inside.

        *goto Home

In the above example, the "Sleep" and "Go outside" options will not be displayed again once selected by the player (due to the overriding hide_reuse command) but the "Eat some food" option will always be selectable when this choice option list is displayed, due to the specific allow_reuse command for that option. 在上面的例子中,"睡觉"和"出去走走"这两个选项一旦被玩家选择后将不再显示(这是由于覆盖性的hide_reuse命令),但"吃点东西"这个选项在该choice选项列表显示时始终可以被选择,这得益于针对该选项的特定allow_reuse命令。

Note 注意

Confused? For a clearer understanding of the purpose of *hide/allow, it would probably be best to approach this topic from the point of view of the more-detailed *hide_reusearrow-up-right command, as allow_reuse is the minor exception, not the main command for this purpose. 感到困惑吗?为了更清晰地理解hide/allow指令的用途,或许最好从更详细的hide_reuse命令角度来探讨这个话题,因为allow_reuse只是次要的例外情况,并非实现此目的的主要命令。