Basic firespawning system

I’m not that very good with lua just started but could someone make a simple fire spawning system where you just get the cods from the map then add a chance of fire spawning. This would be used for roleplay.

Check out for hiring people to write code for you. This forum is for developers who are stuck and need help fixing a bug. If you decide to write it and get stuck, we’ll be more than happy to help, but I doubt anyone will write a fire-spawning and management script for free.

Here is what you do:

Make a new entity.
Make a random chance of it spawning fire.
Place entity on map.

That sounds like it could get awfully laggy.

Or you could just every so often do a random chance of like 1/10 to ents.findbyclass a random prop_physics and set it on fire. Heck you could even just check which props are made of wood and pick one of those if you wanted to get serious about it.

Or, the server could manage areas where you take damage, and where fire is located without spawning entities; and each time the fire spreads, send that new location to the client. Have the client render the fire with it tied to RealTime( ) so that all clients see the same thing. No entities, and less lag.

I made a fire system, it can support 10s of thousands of fires at once. I think the limit I reached was over 200,000 fires; at that point the client just stopped responding. Once I cleared fires everything was back to normal. Server had 0 lag.