tenenusaw Posted June 1, 2019 Posted June 1, 2019 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.