I am trying to let horde to capture city and settle there by script, but after emergement they siege needed settlemen(it is scripted) and then they abandon it or sack... Whant should I do?
I am trying to let horde to capture city and settle there by script, but after emergement they siege needed settlemen(it is scripted) and then they abandon it or sack... Whant should I do?
I have found that this Effect doesn't kick in until the next turn. So it is possible that he could still move out during that turn. To keep him there for that turn you can add this to the script:
console_command mp {general name/label} -1
Vegas_Bear Should I create trait at export_descr_character_traits and then add to scripts?
Withwnar I tried but when I checked log there was mistake that character can not be found...
Yes, that is where it goes, ex-
Campaign Script-;------------------------------------------
Trait Frozen
Characters family
Hidden
Level Frozen
Description Frozen_desc
EffectsDescription Frozon_effects_desc
Threshold 1
Effect MovementPoints -120 <=== This amount should equal whats in descr_character
If you gave your general a label, substitute William Plantagenet w/ the label. This should fire after the general captures the settlement and is still alive. He will remain frozen until you remove the trait or give him movement points.monitor_event GeneralCaptureSettlement SettlementName Jerusalem
and FactionType England
and I_CharacterExists William Plantagenet
console_command give_trait "William Plantagenet" Frozen 1
end_monitor
You can use Withwnar way, it doesnt require a trait. Just change the console command line to -
console_command mp William Plantagenet -1
Hope this clears it up a bit,
VB
I meant for the first turn end only, then using a trait for the rest. But yeah, you could just use "mp" instead of a trait but you will need to reapply it at the start of every turn. Something like...
...where settlement_keeper1 is his label.Code:monitor_event PreFactionTurnStart FactionType england if I_CharacterExists settlement_keeper1 console_command mp settlement_keeper1 -1 end_if end_monitor
@Ostrogoth
If you are still getting "no such character" log errors then there's something wrong with the script. We'd need to see it.