My test trivial smoke example code:
Code: Select all
{
type = "trivial-smoke",
name = "stasis_mine-stasis_target_impact_effect",
animation = {
filename = Constants.AssetModName .. "/graphics/entity/stasis_impact_effect.png",
flags = {"trilinear-filtering"},
line_length = 4,
width = 91,
height = 93,
frame_count = 16,
direction_count = 1,
tint = nil,
scale = 1
},
duration = tonumber(settings.startup["stasis_mine-stasis_time"].value) * 60,
fade_in_duration = 120,
fade_away_duration = 30,
movement_slow_down_factor = 1,
cyclic = true,
affected_by_wind = false,
show_when_smoke_off = true
}
Code: Select all
action = {
type = "direct",
action_delivery = {
type = "instant",
source_effects = {
{
type = "nested-result",
affects_target = true,
action = {
type = "area",
radius = 6,
action_delivery = {
type = "instant",
target_effects = {
{
type = "create-trivial-smoke",
smoke_name = "stasis_mine-stasis_target_impact_effect"
}
}
}
}
}
}
}
}
Code: Select all
entity.surface.create_trivial_smoke {
name = "stasis_mine-stasis_target_impact_effect",
position = entity.position
}