Is it possible for someone to show me how to set a character spawned as part of an emergent faction to attack a specific settlement?
Eg; emergent faction norway, character Haakon Haakonsson, to attack Oslo.
Any help very welcome.
Is it possible for someone to show me how to set a character spawned as part of an emergent faction to attack a specific settlement?
Eg; emergent faction norway, character Haakon Haakonsson, to attack Oslo.
Any help very welcome.
Code:siege_settlement attacking_character, settlement_name [,maintain|attack] Instruct the character to siege the settlement siege_settlement Gaius Julius, Rome, attack SIEGE_SETTLEMENT
I've got this working a treat now, thanks GrnEyedDvl! Norway emerge near Oslo, first army beseiges and second assaults, Fantastic!
+ rep
For my next step I would like the Tuetonic Order to emerge when the first crusade is called. Any more guidence?
Note that if the faction is hording it won't necessarily settle down after capturing the settlement (this is slightly irrelevant to this topic but it should be here for people searching the forums I think).
As for your second question: Make a monitor_event which triggers on the CrusadeCalled event, spawn the teutons like normal, then terminate_monitor in the last line of the monitor (terminate_monitor removes the thing from the memory so it won't trigger again for each crusade)
Thanks alpaca, I'm using the declare_counter declarar_guerra I found in another tutorial, and although I've got this working perfectly, I must confess that I dont actually understand the second part 'declarar_guerra'. I would be gratefull if someone could explain the meaning of the term.
Its just a variable name. A counter is a place to store a numeric value and reference it later. You can name them whatever you want.
declare_counter new_counter
declare_counter pick_a_name
This tells the game you are creating new counters, one called new_counter, one called pick_a_name.
set_counter new_counter 5
set_counter pick_a_name 10
This tells the game to change the value of new_counter to 5 and the value of pick_a_name to 10.
Then you can compare the values of the counters.
if I_CompareCounter new_counter = 5
and I_CompareCounter pick_a_name = 10
do some stuff
end_if
That helps a lot. But I'm struggling to get the TO to emerge when the crusade is called. Could you scripting guru's check out where I'm going wronge?
Spoiler Alert, click show to read:
You dont have a condition after your event.
You need to have a condition as well.Code:monitor_event crusade_called
Code:monitor_event CrusadeCalled TargetSettlementName Jerusalem
This is still giving me problems...
Spoiler Alert, click show to read:
Now I'm getting a CTD when the event should trigger. unspecified error...
#Edit. Ok I removed the add_event and it worked fine. I assumed the emergent_faction was generic and could be used by any faction.
PS is there any way to change the condition so that any crusade target will set the trigger?
Last edited by Eothese; July 23, 2008 at 03:05 PM.
You have to set the faction as emergent in descr_sm_factions I think.
Try:
monitor_event CrusadeCalled TrueCondition