• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

grundy122

Private
Dec 9, 2022
22
0
So, I created this indestructible artifact, right? But I want to make it so, after an even happens, the player loses it for good.

Here's what I tried;

immediate = {
if = { limit = {has_artifact = my_artifact}

any_artifact = {
if = {
limit = { has_artifact_flag = is_my_custom_artifact}
indestructible = no
}

}

destroy_artifact = my_artifact
}
}

But it doesn't seem to be working.
 
Only a certain set of commands are supported in the CK2 scripting engine. There is no command that can change an artifact from destructible to indestructible.

However, your actual goal is to destroy the artifact, and the unsafe_destroy_artifact command seems perfect for that.