3回釣ったら水が引く

要件

  1. 水の仕掛けを設置する(以下: 水と略す)
  2. 水の上部に魚釣りゾーンを設置して釣り場を作る
  3. 魚を釣ったイベントを整数で記録する
  4. 3回釣ると水位を下げる

使用する仕掛け

  1. 水の仕掛け(x1)
  2. 魚釣りゾーンの仕掛け(x1)

使用するアイテム

  1. フィッシングフック
    • アイテムスポナー / フィッシィングフックバレルの仕掛け / 自販機
    • など好きな方法で渡して良い

回答

回答を見る
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }

three_limited_fising_device := class(creative_device):
    @editable
    FishingZoneDevice:fishing_zone_device = fishing_zone_device{}
    @editable
    WaterDevice:water_device = water_device{}

    var CatchCount:int = 0

    OnBegin<override>()<suspends>:void=
        FishingZoneDevice.CaughtEvent.Subscribe(OnCatch)

    OnCatch(Agent:agent):void=
        set CatchCount += 1
        if(CatchCount = 3):
            WaterDevice.BeginVerticalEmptying()