unit creating entities raising on_trigger_created_entity
Posted: Mon Apr 11, 2016 1:48 pm
it is possible to create entities when a unit is atacking using something like that :
the thing is, it doesn't seem to raise the on_trigger_created_entity event ...
linked, a small mod that shows the event is never triggered. (just create a new game, place a building, the bitter will attack it)
Code: Select all
attack_parameters =
{
type = "beam",
ammo_category = "laying-explosives",
cooldown = 100,
range = 0,
ammo_type =
{
category = "laying-explosives",
action =
{
type = "direct",
action_delivery =
{
type = "instant",
target_effects =
{
type = "create-entity",
entity_name = "layed-explosives",
offsets = {{0, 0}},
trigger_createdentity="true",
}
}
}
},
animation = biterattackanimation(mediumbiterscale, medium_biter_tint1, medium_biter_tint2)
},
linked, a small mod that shows the event is never triggered. (just create a new game, place a building, the bitter will attack it)