Jump to content

How do you change the script in Art of the Catch to spawn any ingredients?


Recommended Posts



function SelectFish()
    Form fish_base = fish_detected.GetBaseObject()

    if fish_base == CritterPondFish01
        PlayerRef.AddItem(CritterPondFish01Ingredient, 1, true)
        _AC_CaughtFish01.Show()
    elseif fish_base == CritterPondFish02
        PlayerRef.AddItem(CritterPondFish02Ingredient, 1, true)
        _AC_CaughtFish02.Show()
    elseif fish_base == CritterPondFish03
        PlayerRef.AddItem(CritterPondFish03Ingredient, 1, true)
        _AC_CaughtFish03.Show()
    elseif fish_base == CritterPondFish04
        PlayerRef.AddItem(CritterPondFish04Ingredient, 1, true)
        _AC_CaughtFish04.Show()
    elseif fish_base == CritterPondFish05
        PlayerRef.AddItem(CritterPondFish05Ingredient, 1, true)
        _AC_CaughtFish05.Show()
    elseif fish_base == CritterSalmon01 || fish_base == CritterSalmon02 || _AC_FishWaterfallTypes.HasForm(fish_base)
        PlayerRef.AddItem(FoodSalmon, 1, true)
        _AC_CaughtFishSalmon.Show()
    endif
endFunction

 

I am looking at the code and it seems I would need to add a function that takes a list as input and then randomly pick one of the elements in the list. However, I have no idea how to refer to the list of all ingredients, or put all ingredients in a list. I also have no idea if there's a randomize function that takes 2 number and outputs a random number between the two number entered.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use