[RESOLVED]New Ammo does nothing?
Posted: Tue Apr 19, 2016 11:45 pm
I've created a new ammunition type and cannot get it to do damage or spawn it's custom on-hit entity.
Code: Select all
data:extend({
{
type = "ammo",
name = "corrosive-bullet-magazine",
icon = "__Utilities-n-More__/graphics/icons/corrosive-bullet-magazine.png",
flags = {"goes-to-main-inventory"},
ammo_type =
{
category = "bullet",
action =
{
type = "direct",
action_delivery =
{
type = "instant",
source_effects =
{
type = "create-explosion",
entity_name = "explosion-gunshot"
},
{
target_effects =
{
{
type = "create-entity",
entity_name = "acid-splash-green"
},
{
type = "damage",
damage = { amount = 10 , type = "acid"},
damage = { amount = 1, type = "physical"},
}
}
}
}
}
},
magazine_size = 10,
subgroup = "ammo",
order = "a[basic-clips]-c[corrosive-bullet-magazine]",
stack_size = 100
}
})
Code: Select all
{
type = "explosion",
name = "acid-splash-green",
flags = {"not-on-map"},
time_before_removed = 5 * 30,
final_render_layer = "corpse",
splash =
{
{
filename = "__Utilities-n-More__/graphics/entities/acid-splash-green/splash-1.png",
line_length = 5,
width = 199,
height = 159,
frame_count = 20,
shift = {0.484375, -0.171875},
},
{
filename = "__Utilities-n-More__/graphics/entities/acid-splash-green/splash-2.png",
line_length = 5,
width = 238,
height = 157,
frame_count = 20,
shift = {0.8125, -0.15625},
},
{
filename = "__Utilities-n-More__/graphics/entities/acid-splash-green/splash-3.png",
line_length = 5,
width = 240,
height = 162,
frame_count = 20,
shift = {0.71875, -0.09375},
},
{
filename = "__Utilities-n-More__/graphics/entities/acid-splash-green/splash-4.png",
line_length = 5,
width = 241,
height = 146,
frame_count = 20,
shift = {0.703125, -0.375},
}
},
splash_speed = 0.6
}