@GED
this is your garrison script or at least part of it.
i need to understand the declare_counter and set_counter , to set a set_counter is it obligatory to add the declare_counter above the monitor_event, in this case for york, london, nottingham, caernarvon and is it York_siege a random name or a requirement like for an example X_siege been X any settlement?
I am a bit confuse with the condition, events and commands, i am not quite sure where to look for what i am planning to script, i would like to have that freedom of understanding an reading the script by simply watching at it.
Is there an order like :
Code:
command event condition
command and the parameters
command
And if so why is the declare_counter is set above the monitors, i mean being a command it make since but it doesn´t have an event it goes straight away to it parameters( York_siege)
Code:
;;;;;;;;;Pool England-Wales, London, York, Nottingham, Caernarvon;;;;;;;;;;
declare_counter York_siege
declare_counter London_siege
declare_counter Nottingham_siege
declare_counter Caernarvon_siege
;;;;;; London ;;;;;;;;;;
monitor_event CharacterTurnEndInSettlement not IsUnderSiege IsGovernor
and SettlementName London
set_counter London_siege 0
end_monitor
monitor_event CharacterTurnEndInSettlement IsUnderSiege IsGovernor
and SettlementName London
and not FactionIsLocal
and not FactionType slave
and I_CompareCounter London_siege = 0
and SettlementBuildingExists = wooden_pallisade
create_unit London, Welsh Spearmen Mercs, num 2, exp 0, arm 0, wep 0
set_counter London_siege 1
end_monitor
Lets say that in my campaign_script i only set this code
Code:
monitor_event CharacterTurnEndInSettlement not IsUnderSiege IsGovernor
and SettlementName London
set_counter London_siege 0
what will happen? for what i understand in the previous class this should be enough to tell the engine that this settlement in not under siege, but what happen if the value " 0 " was instead a value " 1 " ?
after that the this code :
Code:
monitor_event CharacterTurnEndInSettlement IsUnderSiege IsGovernor
and SettlementName London
and not FactionIsLocal
and not FactionType slave
and I_CompareCounter London_siege = 0
and SettlementBuildingExists = wooden_pallisade
create_unit London, Welsh Spearmen Mercs, num 2, exp 0, arm 0, wep 0
set_counter London_siege 1
end_monitor
tells the engine what will happen after the besiege settlement is true, or we want it to do for us. and i correct?
but again what does this " = 0 " means?
Code:
and I_CompareCounter London_siege = 0
because if it was a 1 would make more sense to me, than again right after that confuse me to hell this code appear:
Code:
set_counter London_siege 1
but this make more sense than the other ones, i totally confuse.. sorry if my explanation is not clear but i am trying my best with the Lil English i know.