Search the Community
Showing results for tags 'timed'.
-
Hi, I'm trying to make a small mod of Hydrocraft to make farming/ranching a little more challenging. My idea is to make it a little more realistic and immersive, with more item sprites, more time between animals aging up, getting sick, etc. The trouble is I'm a scripting noob, so if anyone could give me some help I would really appreciate it. For example, here is one of the scripts I'm trying to mod: ItemTimeTrackerMod["HCSheepfemale"] = {}; ItemTimeTrackerMod["HCSheepfemale"]["Life"] = 120.0; ItemTimeTrackerMod["HCSheepfemale"]["TurnInto"] = "Hydrocraft.HCSheepfemalehungry"; I'd like it so that when the sheep changes states from normal to hungry, it makes a "baa" sound. I liked the idea of, like a real farm, you are woken in the morning by the animals calling for their food. Or a rooster crowing in the morning, you know. Farm stuff. How would I add a sound into the above script? How would I code it? I've looked up multiple scripting help guides but I can't find an answer. Problem #2, I'd like to alter the breeding recipes so that there is a random chance to get a male or female baby animal, or none at all. Here is the breeding recipe for pigs: recipe Breed Pigs { HCPigmale, HCPigfemale, Apple/Carrots/Cabbage/Corn/Lettuce/HCGrass/HCStraw/HCChinesecabbage/HCCornred/HCCornblue/HCCornwhite/HCCabbagered/HCCabbagewhite, Water, CanBeDoneFromFloor:true, Result:HCPigmalebaby=3, OnCreate:recipe_hcpigbreeding, Time:2000.0, NeedToBeLearn:true, Sound:oink, Category:Ranching, } recipe Breed Pigs { HCPigmale, HCPigfemale, Apple/Carrots/Cabbage/Corn/Lettuce/HCGrass/HCStraw/HCChinesecabbage/HCCornred/HCCornblue/HCCornwhite/HCCabbagered/HCCabbagewhite, Water, CanBeDoneFromFloor:true, Result:HCPigfemalebaby=3, OnCreate:recipe_hcpigbreeding, Time:2000.0, NeedToBeLearn:true, Sound:oink, Category:Ranching, } These are two different recipes. How would I alter it so it's one recipe with multiple possible results? Thank you very much for your attention and any help you could havefer would be greatly appreciated! <3