OK play went to staccato when I built a water sprinkler. The console shows the "moisture listener" sampling the nettle vines at least a few times per second--catching only minuscule changes. I have nearly zero coding experience, but I do play a LOT of dwarf fortress, which runs into similar problems of polling statuses/data/effects in a ticks-per-second system. Limiting off-screen polling should help, or it may be better to sample once every five seconds, or assume:
If player.location > (sprinkler.location + 30) while sprinker.fuel > 0; radius = 3 soakedArray = ([sprinkler.location]-radius, [sprinkler.location]+radius) for nettle in soakedArray nettle.wetness = 100 or TRUE wait 5000
Not sure if it's a bug, but if I remove a sprinkler with the command "TheInput:GetWorldEntityUnderMouse():Remove()", the sprinkler object and moisture listener disappear, but the water spraying animation and player wetness continue.
Steps to Reproduce
Transplant several (>7) nettles and build a sprinkler. Leave the area and walk around.
Transplant several (>7) nettles and build a sprinkler. Leave the area and walk around.
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now