Poison cloud damage - no trees

Place to get help with not working mods / modding interface.
Post Reply
User avatar
IngoKnieto
Long Handed Inserter
Long Handed Inserter
Posts: 81
Joined: Mon Oct 03, 2016 9:29 am

Poison cloud damage - no trees

Post by IngoKnieto » Sun Sep 16, 2018 8:39 pm

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...

User avatar
IngoKnieto
Long Handed Inserter
Long Handed Inserter
Posts: 81
Joined: Mon Oct 03, 2016 9:29 am

Re: Poison cloud damage - no trees

Post by IngoKnieto » Sun Sep 16, 2018 10:00 pm

Code: Select all

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

Post Reply

Return to “Modding help”