 |
|  |
 |
|
Dreamer
|
|
Singapore
Dec 1999 time: 05:13
|
|
As discuessed in the other City Units thread, here is the revised trigger to check enemy stacked units content.
code:
// Check contents of stacked units
Trigger 'CheckStackContents' when(clicked.unit && (unit.owner != g.player)
&& (UnitsInCell(unit.location) > 1)){ //continued from above
Message(g.player, 'CheckStackContentsMessage');
}
Alertbox 'CheckStackContentsMessage' {
SetPlayer(1, unit.owner);
i = 0;
u = 4;
while (i < player.1.totalunits) {
SetUnitByIndex(3, player.1, i);
if (unit.3.location == unit.location) {
SetUnit(u, unit.3);
u = u + 1;
}
i = i + 1;
}
Text(ID_CHECK_STACK_CONTENTS_MESSAGE);
EyeDropDown(4, unit);
Button(ID_BUTTON_CLOSE) {
Deselect(); // suggested by skorpion59
Kill();
}
}
[This message has been edited by Dreamer (edited January 14, 2000).]
|
|
|  |
 |
|
Rowick Hepan
|
|
Australia
Nov 1999 time: 05:13
|
|
Hi,
I'm a newby to slicks, could you explain who I might implement the above? Where do I put it etc.
|
|
|  |
 |
|
skorpion59
|
|
Tulsa, Oklahoma, USA
May 1999 time: 23:13
|
|
You also have to have the actual CHECK_STACK_CONTENTS_MESSAGE (which isn't listed above) in one of your files in your English\gamegata folder. BUTTON_CLOSE is already defined so you don't have to worry about it.
UPDATE:
Dreamer, sorry if this is an old version.
Put
CHECK_STACK_CONTENTS_MESSAGE "The location contain the following units:"
in the scen_str.txt file in your English\gamedata folder.
Don
[This message has been edited by skorpion59 (edited January 16, 2000).]
|
|
|  |
 |
|
Rowick Hepan
|
|
Australia
Nov 1999 time: 05:13
|
|
Loc: Seems to have worked, I assume it only allow me to look at friendly stacks.
|
|
|  |
 |
|
Rowick Hepan
|
|
Australia
Nov 1999 time: 05:13
|
|
No.... I was wondering why someone would create a slic to look at your own units. I'll have a play with it - any ideas are much appreciated.
|
|
|  |
All times are GMT. The time now is 05:13. Apolyton Time is 00:13. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|