Log in

View Full Version : Are scripts compatible at the same time?



Monkwarrior
02-21-2006, 11:31
I wonder if a background campaign script would be compatible with show_me scripts launched from export_descr_advice with the corresponding trigger.

Would it be an advantage with regard to speed in campaign? (it seems that very long background scripts introduce long end-of-turn AI time).

LorDBulA
02-21-2006, 12:12
Do you want to make background script that will trigger show_me scripts when bs has to do something?

If thats correct then in most cases its not good solution.
1). You can only activate show_me script on player turn.
2). You cant past any data (stored in counters) from bs to show_me script.

Possibly you can find some application for this idea, but it will be problem specific.
In general something like this is not very good. You cant use it as functions in program language.

Monkwarrior
02-21-2006, 12:33
I didn't explain myself. :embarassed:

My idea was to leave in a background script the things that need counters, as they will need to be checked continuously. For example the spying script I included in ITW.

But, to make the bs shorter, I thought in the possibility of having very short scripts that would be launched when the player makes something that opens some scroll. For example: when the Attack_Allies advice appears, if the player press yes to the attack, I'd like to force diplomacy against him. Or the same about diplomacy when one faction expands beyond some limit.

Thus, are those two types of scripts compatible at the same time?:juggle2:

LorDBulA
02-21-2006, 14:18
Well BS and show_me scripts can run at the same time.
Show_me scripts are the best if you need input from player: like simple YES/NO decision.


I thought in the possibility of having very short scripts that would be launched when the player makes something that opens some scroll. For example: when the Attack_Allies advice appears, if the player press yes to the attack, I'd like to force diplomacy against him.

So you would like to stop player from breaking alliance?
I dont know in show_me scripts are the best for it.
To activate show_me script player (or BS script) has to press show_me button.
If you can detect click on ok button for attack faction scroll then you should be able to do it. I just dont know why you want to use show_me script for it.

If you want to stop player from braking alliance other way then through diplomacy i would advice checking disable ui element (i dont remember exact command).
With a bit of luck maybe you will be able to disable OK button so it will look like when you try attack senate in the first turn in RTW.