Damaging fish with grenades

This is the place to request new mods or give ideas about what could be done.
Plasticizer
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Dec 22, 2016 12:16 pm
Contact:

Damaging fish with grenades

Post by Plasticizer »

Hi,

I'm creating a mod & depending on the entity that has been killed, you'll get a different item.
But when trying to damage the fish with anything but a bullet, it doesn't seem to work.
i.e. rockets just delete the fish, any other explosive or capsule does nothing, ...

How can I make the fish take damage from the grenade that hit it?

I tried collision damage like bullets, but that doesn't seem the case.
Also, I've noticed "fire" does damage the fish as well...
So it doesn't seem to be "under water".

Any help is welcome :)
Last edited by Plasticizer on Fri Feb 28, 2025 5:38 pm, edited 1 time in total.
Plasticizer
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Dec 22, 2016 12:16 pm
Contact:

Re: Damaging fish with grenades

Post by Plasticizer »

what I've tried to add to the grenade, but it does nothing

Code: Select all

		table.insert(
				action.action_delivery.target_effects, 
				{
					type = "damage",
					damage = {
						type = "capture", amount = 100 * strength
					}
				}
			)
			table.insert(
				action.action_delivery.target_effects,
				{
					type = "activate-impact",
					deliver_category = "bullet"
				}
			)
			table.insert(
				action.action_delivery.target_effects,
				{
					type = "create-entity",
					entity_name = "explosion-hit",
					offsets = {{0, 1}},
					offset_deviation = {{-0.5, -0.5}, {0.5, 0.5}}
				}
			)
			table.insert(
				action.action_delivery.target_effects,
				{
					type = "invoke-tile-trigger",
					repeat_count = 1
				}
			)
Post Reply

Return to “Ideas and Requests For Mods”