hi, I would be very appreciative if some one would be willing to help me get the simple script for making an event faction specific (only seen by them)
thank you
druvatar![]()
hi, I would be very appreciative if some one would be willing to help me get the simple script for making an event faction specific (only seen by them)
thank you
druvatar![]()
If you use the historic_event command then it has a factions parameter which serves this purpose.
This will only show the "robin_hood_dies" event when playing England:
I don't know if the factions parameter is for Kingdoms only.Code:monitor_event FactionTurnStart FactionIsLocal and I_TurnNumber == 5 historic_event robin_hood_dies factions { england, } terminate_monitor end_monitor
EDIT: Alternatively you could do it this way...
...but this doesn't allow for including more than one faction (as it is).Code:monitor_event FactionTurnStart FactionIsLocal and I_TurnNumber == 5 if I_LocalFaction england historic_event robin_hood_dies end_if terminate_monitor end_monitor
EDIT2: Using the first method you can use something like factions { england, scotland, denmark, }
Last edited by Withwnar; May 11, 2011 at 11:40 AM.
thank you!![]()
I'm not sure you caught my last edit as we posted at the same time. I have turned it into an "edit 2".
yes, I got that, I will test it & post my results! thank you!![]()
it is not triggering
I have the proper entry in historic_events text
(in fact, for testing purposes I am using an event which was originally just a "regular" historic event
and I simply deleted the entry in desc_events and adding the script given to the Campaign_script like this:
may be I need the event images file from one of the kingdoms campaigns?Code:monitor_event FactionTurnStart FactionIsLocal and I_TurnNumber == 1 if I_LocalFaction milan historic_event shelabi end_if terminate_monitor end_monitor end_script
Last edited by Druvatar De Bodemloze; May 11, 2011 at 12:15 PM.
did as you suggested but still nothing and I made sure script campaign_script txt. was at the bottom of my desc_strat
this is the script with your suggested edit Ishan
Code:monitor_event FactionTurnStart FactionIsLocal and I_TurnNumber = 1 if I_LocalFaction milan historic_event shelabi end_if terminate_monitor end_monitor
Well i did inserted and condition after if line not just the = thing.
Anyways use this simple one:-
Code:monitor_event FactionTurnStart I_TurnNumber = 12 historic_event X_Y factions { england, scotland, ireland, } terminate_monitor end_monitor![]()
This might be the problem: if you inserted yours between wait_monitors and end_script then move it to before the wait_monitors line instead...
I think that this monitor will trigger once for each faction on turn 12. You will still only see it if you're playing as milan (in Druvatar's example) but you will see it about 20 times (faction count). Having FactionIsLocal as a monitor condition limits it to triggering just once.Code:monitor_event FactionTurnStart ... ... end_monitor ;---------------------------------------------------- ; keep script unfinised until last monitor termination wait_monitors end_script
By the way, you can use = or == in conditions.
EDIT: sorry, no, it will only trigger once because the terminate_monitor will kill after the first one.![]()
Last edited by Withwnar; May 11, 2011 at 11:13 PM.
still no go I (scripting aggh!)
any way is my entry in campaign_script txt.
here is my entry in historic_eventsCode:monitor_event FactionTurnStart I_TurnNumber = 1 historic_event shelabi_intro factions { milan, } terminate_monitor end_monitor
here is what is at the bottom of my desc_stratCode:{SHELABI_INTRO_BODY}The Shelabi {SHELABI_INtRO_TITLE} The Shelabi
Code:; >>>> start of regions section <<<< script campaign_script.txt![]()
ok I do not have a wait_monitors line where should I put it?
& thank you for your efforts
this the very first script I am adding into this mod
my complete campaign_script
Code:; ; Campaign script by gigantus ; script restrict_strat_radar false ; console_command toggle_fow monitor_event FactionTurnStart I_TurnNumber = 1 historic_event shelabi_intro factions { milan, } terminate_monitor end_monitor end_script
done got it working thanks a bunch! guys!
The TWC University’s archive has some classes on writing scripts:
Scripting 101
Introduction to Scripting
Code:monitor_event FactionTurnStart FactionIsLocal and I_TurnNumber = 0 if I_LocalFaction england historic_event england_intro factions { england, } end_if if I_LocalFaction scotland historic_event scotland_intro factions { scotland, } end_if if I_LocalFaction ireland historic_event ireland_intro factions { ireland, } end_if end_monitor
Last edited by TNZ; May 12, 2011 at 12:24 AM.
A bit ambiguous wasn't it? I meant the " factions { xxx, }" on the historic_event lines.
It's my understanding that in a hot-seat game it wouldn't be redundant at all but would ensure that the player only sees the historic event meant for their faction.![]()
Ah, I don't know much about hot seat scenarios.
But wouldn't...
... mean that the historic_event line would only be reached if the player is england? So they won't see the event if they're not playing england. I don't understand how adding "factions { england, }" helps any in this case.Code:if I_LocalFaction england historic_event england_intro end_if