Page 1 of 1

Poison cloud damage - no trees

Posted: Sun Sep 16, 2018 8:39 pm
by IngoKnieto
Does anybody know how to make a poison cloud, that doesn't damage trees?
I would like to make one, that only damages worms, biters and players, but I can't find the right combination of entity_flags and forces.

Code: Select all

action =
    {
      type = "direct",
      action_delivery =
      {
        type = "instant",
        target_effects =
        {
          type = "nested-result",
          action =
          {
            type = "area",
            radius = 15,
	    entity_flags = {"breaths-air"},
	    force = "enemy",
            action_delivery =
            {
              type = "instant",
              target_effects =
              {
                type = "damage",
                damage = { amount = 20, type = "poison"}
              }
            }
          }
        }
      }
    }
This damages biters and worms, but not the player. In fact a force="player" doesn't seem to exist (-> error while loading entity prototype yx: unknown force condition: player).
But I'm pretty sure I exist...

Re: Poison cloud damage - no trees

Posted: Sun Sep 16, 2018 10:00 pm
by IngoKnieto

Code: Select all

entity_flags = {"breaths-air"},
forces = {"ally","enemy"},
This does the trick :)