Page 1 of 1

Using entity freezing as a script trigger

Posted: Mon Sep 01, 2025 10:05 pm
by Chicago119
Howdy all,

I'm currently working on a mod to add new plastic pipes to the game. I'm 90% done, assets and most of the lua is at least first-draft done.

But I thought it would be a fun option to add to have a %chance of these pipes breaking when frozen (adjustable, but default I'm thinking like 10% chance). Issue is I believe that's all actually handled by the engine and not really exposed in the API? Maybe I'm wrong, but is there a discrete "whoosh this entity is now frozen" event or maybe even tie it to the alert, that I can use as a trigger for a wee script?

Reasonably I could do this with a poll on an hourly or even less frequent basis. This is just flavor and I think it ultimately matters very little (and rhymes closer with real life probably) if pipes burst immediately on freezing vs "in an hour from now". But I've had the thought now and want to see if there's a way to do it trigger-based.

Re: Using entity freezing as a script trigger

Posted: Tue Sep 02, 2025 4:47 am
by Osmo
There isn't a trigger for that and a good chance there won't be. If you really want to, you could implement it with a system similar to minecraft random ticks, but it would take some work to make it efficient and if its only a cometic option, and may even be detrimental to gameplay without a good reason, it's probably not a good idea