~~NOTOC~~ <=[[4rpl:start| Index]] :!: Available in version 2.0 and later. ====== SetMeshHealth ====== SetMeshHealth(<-cellX <-cellZ <-health) ===== Description ===== Sets the mesh health value for a given cell.\\ See [[GetMeshHealth]] for the value ranges. Note that this does not create Mesh at a location if it does not exist. To create mesh where it does not exist (or remove it), use [[SetTerrainSpecial]]. Applying this to cells without Mesh can create problems, such as creeper ignoring void height. Therefore it's best to only apply this function to cells that have Mesh. \\ :!: __Bug__: If you do this to cells without mesh, "mesh health" will appear on that cell, that cell will have the mesh's traits like "Mesh Depth" in the map > game settings, and allows that cell to be targeted by units that can target mesh. \\ However, it will completely disappear once that cell has been damaged by [[DamageMesh]] API or vanilla units. \\ :NOTE: \\ Cannon and Mortar both deal 0.52 mesh damage, which translates to 520000 for this API. \\ So [Mesh Health] - [Cannon/Mortar] = 1000000 - 520000. ===== Examples ===== SetTerrainSpecial(100 50 6) SetMeshHealth(100 50 1000000) <=[[4rpl:start| Index]]