Dear Mr. Ogre,
Dear fellow SLIC programmers,
I have tried to establish a warning system which gives the human player a short message as soon
as one of the human units has spotted enemy units being able to bombard. Fortunately, it works,
unfortunately only in one direction:
Below SLIC script will only trigger the warning if a human unit spots such an enemy while MOVING,
unfortunately it will not trigger the warning if such an enemy unit just happens to move out of
the fog of war into tiles which are visible to human units or cities.
Can one of you help me there ? I would like to use the full working script as a kind of workaround for the bug that enemy bombarding is not autocentering properly.
Thanks for looking at this,
TP
SCRIPT.SLC
//
// Warning in case units with bombarding abilities are spotted (see info-str.txt for strings)
//
trigger 'TP_T_Warning_Bombarding' when (player.sightedunit && IsBombardingUnit(unit) && unit.owner != 1) {
Message(g.player, 'TP_M_Warning_Bombarding');
}
messagebox 'TP_M_Warning_Bombarding' {
Title(ID_TP_TITLE_Warning_Bombarding);
Text(ID_TP_TEXT_Warning_Bombarding);
}
INFO-STR.TXT
##
## Warning on sight of bombarding capable units (see script.slc for SLIC part)
##
TP_TITLE_Warning_Bombarding "[unit.name] sighted !"
TP_TEXT_Warning_Bombarding "Beware: One of our units, a [unit.2.name] has spotted a [unit.name] which is able to bombard."
Dear fellow SLIC programmers,
I have tried to establish a warning system which gives the human player a short message as soon
as one of the human units has spotted enemy units being able to bombard. Fortunately, it works,
unfortunately only in one direction:
Below SLIC script will only trigger the warning if a human unit spots such an enemy while MOVING,
unfortunately it will not trigger the warning if such an enemy unit just happens to move out of
the fog of war into tiles which are visible to human units or cities.
Can one of you help me there ? I would like to use the full working script as a kind of workaround for the bug that enemy bombarding is not autocentering properly.
Thanks for looking at this,
TP
SCRIPT.SLC
//
// Warning in case units with bombarding abilities are spotted (see info-str.txt for strings)
//
trigger 'TP_T_Warning_Bombarding' when (player.sightedunit && IsBombardingUnit(unit) && unit.owner != 1) {
Message(g.player, 'TP_M_Warning_Bombarding');
}
messagebox 'TP_M_Warning_Bombarding' {
Title(ID_TP_TITLE_Warning_Bombarding);
Text(ID_TP_TEXT_Warning_Bombarding);
}
INFO-STR.TXT
##
## Warning on sight of bombarding capable units (see script.slc for SLIC part)
##
TP_TITLE_Warning_Bombarding "[unit.name] sighted !"
TP_TEXT_Warning_Bombarding "Beware: One of our units, a [unit.2.name] has spotted a [unit.name] which is able to bombard."
Comment