Skip to content

Blast Gas

Robin Seifert edited this page Jul 4, 2023 · 2 revisions

Blast: Gas Cloud

Base for any explosive that generates a cloud. This includes debilitation, chemical, contagious, and colorful.

Supports blast#scale as a way to change the size of the cloud. This will always be rounded up to the nearest whole number. This way tiles can be filled properly with the cloud.

Additionally duration is used to set the life span of the cloud. This prevents it from lingering forever and giving a more realistic effect.

Logic

Gas cloud is designed to spawn a cloud at the trigger location. Each tick the cloud will grow until it hits max size. Anything inside the cloud will be applied with an effect based on the type.

Cloud growth is done using a breadth first pathfinder. Each tick it will attempt to path blocks to spawn more cloud particles. The visuals are not directly connected to the locations. Allowing for easier customization of the effect of the cloud.

Each type can customize the tick rate of the effect, the effect itself, color(s), etc. Allowing for a wide range of different types while maintaining a similar feature set.

Developers

BlastGasBase can be used to implement new types in addons.

Clone this wiki locally