Creating Ore with Projectiles
Posted: Sun Jul 31, 2016 5:22 pm
First time post here. Trying to make an asteroid that crashes down as ore, which kinda works. It does create the ore where it hits but ignores the amount field. It only creates a 50 quantity spot. I've been modding for all of 1 day so my mod fu is terribly weak.
Code: Select all
data:extend{
{
type = "projectile",
name = "asteroid",
flags = {"not-on-map"},
acceleration = 0.01,
action =
{
{
type = "direct",
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "create-entity",
entity_name = "iron-ore",
amount = 2000,
},
{
type = "create-entity",
entity_name = "massive-explosion"
},
--[[{
type = "create-entity",
entity_name = "small-scorchmark",
check_buildability = true
}]]
}
}
},
{
type = "area",
perimeter = 8,
action_delivery =
{
type = "instant",
target_effects =
{
{
type = "damage",
damage = {amount = 80, type = "explosion"}
},
--[[ {
type = "create-entity",
entity_name = "explosion"
}]]
}
}
}
},
light = {intensity = 0.5, size = 4},
animation =
{
filename = "__asteroids__/graphics/asteroid_01.png",
line_length = 8,
width = 128,
height = 128,
frame_count = 32,
priority = "high"
},
},