Page 1 of 1

LuaEntityPrototype sounds

Posted: Wed Mar 11, 2026 6:59 pm
by AverseMoon
atm only EntityPrototype (data stage) has entity sounds (mining, mined, walking, etc) in it, i would like a way to access these at runtime for a specific LuaEntityPrototype

Re: LuaEntityPrototype sounds

Posted: Wed Mar 11, 2026 7:20 pm
by Donion
Those sounds can be played using the SoundPath.
Or do you want to do something else with the sounds?

Re: LuaEntityPrototype sounds

Posted: Wed Mar 11, 2026 7:29 pm
by AverseMoon
i would like to get the mining sounds for any arbitrary entity but

Code: Select all

entity.prototype.mining_sound
will not work as entity.prototype is a LuaEntityPrototype (runtime prototype) and the mining_sound property is only available in EntityPrototype (data stage)

Re: LuaEntityPrototype sounds

Posted: Wed Mar 11, 2026 8:12 pm
by Donion
Ah, I see what you mean.

Re: LuaEntityPrototype sounds

Posted: Thu Mar 12, 2026 7:13 pm
by Rseding91
AverseMoon wrote: Wed Mar 11, 2026 6:59 pm i would like a way to access these at runtime for a specific LuaEntityPrototype
Why?