[1.1.6] Damage in smoke-with-trigger can't damage spidertron.

Place to get help with not working mods / modding interface.
Post Reply
heyqule
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Sun Mar 05, 2017 1:35 am
Contact:

[1.1.6] Damage in smoke-with-trigger can't damage spidertron.

Post by heyqule »

The damage modifier in smoke-with-trigger can't damage spidertron. It's able to damage other entities such as wall and turrets. Is this intentional?

Code: Select all

    {
        name = name.."-electric-cloud-"..level,
        type = "smoke-with-trigger",
        flags = {"not-on-map"},
        show_when_smoke_off = true,
        particle_count = 2,
        render_layer = "explosion",

        affected_by_wind = false,
        duration = 120,
        cyclic=true,

        animation = Sprites.empty_picture(),
        action =
        {
            type = "direct",
            action_delivery =
            {
                type = "instant",
                target_effects =
                {
                    type = "nested-result",
                    action =
                    {
                        type = "area",
                        radius = 5,
                        force = 'enemy',
                        action_delivery =
                        {
                            type = "instant",
                            target_effects =
                            {
                                type = "damage",
                                damage = { amount = 50, = "electric"}
                            }
                        }
                    }
                }
            }
        },
        action_cooldown = 15
    },
    

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [1.1.6] Damage in smoke-with-trigger can't damage spidertron.

Post by Klonan »

Moving to modding help

You need to set the collision mask of the trigger effect, or set `ignore_collision_condition` to true:
https://wiki.factorio.com/Types/TriggerItem

heyqule
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Sun Mar 05, 2017 1:35 am
Contact:

Re: [1.1.6] Damage in smoke-with-trigger can't damage spidertron.

Post by heyqule »

Thanks Klonan!

Post Reply

Return to “Modding help”