Generic selectors
Exact matches only
Search in title
Search in content
Search in project

How to set underwater breathe

With Atavism, you can define water regions and underwater effect, like if your player has enough air to breathe, and if not he will take the damage.

In order to do this you should follow these few steps:

  1. Create the effect of type state
  2. Create the region (you can follow this tutorial) with the following parameters
  3. Create a breath and breath-max stats
    In most cases, if you are using the water region you will want to have a breath stat which will go down while the player is within the water region. Open Atavism Editor and define a new stat in the stat plugin.



    This means that the breath will only go down for players, and it will go down by 1 every 1 second if the underwater state is true. The reverse value will be applied if the player will be outside the water region and it will go up by 5 every 1 second. If the breath will reach the minimum value which is set to 0, it will kill the player.

  4. Configure the breath and breath-max statistics in the player character template plugin in the Atavism Editor, set it to 100, save and restart the Atavism world server.