I've created this event (it looks like this after I fell to the depth modding despair):
and it is triggered from here:
The problem is that event is triggered only once per tile, when structure is complete. Events "ffu_il_buildinginit.2" and "ffu_il_buildinginit.3" are exactly same copies of the "ffu_il_buildinginit.1" but with changed numbers. Adding similar trigger to the "ffu_il_buildinginit.101" has very same effect: this event is triggered only once from Tile and never again from same tile. This is how "ffu_il_buildinginit.101" looks:
What am I doing wrong with this event? Why I can trigger it again from the same Tile? Thanks.
Code:
planet_event = {
id = ffu_il_buildinginit.1
hide_window = yes
is_triggered_only = yes
immediate = {
random_tile = {
limit = {
NOT = { has_global_flag = enrichment_in_progress_01 }
has_building = building_enrichment_project_01
has_building_construction = no
}
set_global_flag = enrichment_in_progress_01
}
if = {
limit = {
has_global_flag = enrichment_in_progress_01
}
remove_global_flag = enrichment_in_progress_01
planet_event = { id = ffu_il_buildinginit.101 }
}
}
}
Code:
on_building_complete = {
events = {
tutorial.14
tutorial.140
ffu_il_buildinginit.1
ffu_il_buildinginit.2
ffu_il_buildinginit.3
}
}
Code:
planet_event = {
id = ffu_il_buildinginit.101
title = ffu_il_buildinginit.101.name
desc = ffu_il_buildinginit.101.desc
picture = GFX_evt_enrichment_project
show_sound = event_construction
#location = from
#fire_only_once = no
is_triggered_only = yes
#trigger = {
# NOT = {
# has_planet_flag = enrichment_in_progress
# }
# owner = {
# is_ai = no
# }
# from = {
# has_building = building_enrichment_project_01
# has_building_construction = no
# }
#}
#immediate = {
# set_planet_flag = enrichment_in_progress
#}
option = {
name = enrichment_project_deposit_minerals
custom_tooltip = enrichment_project_deposit_minerals_desc_v1
hidden_effect = {
#remove_planet_flag = enrichment_in_progress
random_tile = {
limit = {
has_building = building_enrichment_project_01
has_building_construction = no
}
remove_building = yes
add_deposit = d_mineral_deposit
}
}
}
option = {
name = enrichment_project_close
custom_tooltip = enrichment_project_close_desc
hidden_effect = {
#remove_planet_flag = enrichment_in_progress
random_tile = {
limit = {
has_building = building_enrichment_project_01
has_building_construction = no
}
remove_building = yes
}
owner = {
add_minerals = 1875
add_energy = 935
add_influence = 35
}
}
}
}