Thread Tools
Old December 9, 2002, 10:47   #1
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 13:20
Local Date: November 1, 2010
Join Date: Jun 2001
Posts: 7,665
Scenario Events and stuff
Can someone answer a few questions, mostly slic related...

1. How do i stop all players from using ANY diplomacy at all with each other via slic? Including stopping the human from initiating diplomacy.

2. If a named unit is killed, how do i make a popup? Like for example if the "HMS Repulse is sunk by the Japanese", when the Japanese attack and sink that particular named unit? It will be a generic unit though (ie unit_battlecruiser) or would i need to create a special unit_hmsrepulse? (that seems overly complicated though for one unti) but it will be killed at game start anyway so...

3. How do i spawn units on a given turn, and the make them attack a specific city or tile in the next turn/s?

I think i could probably dig some of these answers from the Alexander scenario etc eventually but it never works when i try to hack pieces from it.

Okay ive got plenty more questions, but these will do for now.
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old December 9, 2002, 11:22   #2
hexagonian
The Courts of Candle'Bre
Emperor
 
hexagonian's Avatar
 
Local Time: 07:20
Local Date: November 1, 2010
Join Date: Jun 1999
Location: Smemperor
Posts: 3,405
Re: Scenario Events and stuff
Quote:
Originally posted by Maquiladora
Can someone answer a few questions, mostly slic related...
1. How do i stop all players from using ANY diplomacy at all with each other via slic? Including stopping the human from initiating diplomacy.
You don't need SLIC, just go into diplomacyproposal.txt and add
Disabled
to all of the proposals you want to turn off



Quote:
Originally posted by Maquiladora
2. If a named unit is killed, how do i make a popup? Like for example if the "HMS Repulse is sunk by the Japanese", when the Japanese attack and sink that particular named unit? It will be a generic unit though (ie unit_battlecruiser) or would i need to create a special unit_hmsrepulse? (that seems overly complicated though for one unti) but it will be killed at game start anyway so...
I'm guessing that you will have to create a new unit and then create a SLIC trigger for the actual event (Ben says that it is easy to do, and I'm hoping to see it pulled off in War of the Ring), but if all you need is a message at the beginning of the game, I hijacked Dale's Diplomod messagebox (diplomod_str.txt) and used it for my own beginning game message. You need to be using Diplomod though.



Quote:
Originally posted by Maquiladora
3. How do i spawn units on a given turn, and the make them attack a specific city or tile in the next turn/s?
Another thing that I would like to see in War of the Ring, so I'm hoping the SLICers can pull some magic out of their hats...
__________________
Yes, let's be optimistic until we have reason to be otherwise...No, let's be pessimistic until we are forced to do otherwise...Maybe, let's be balanced until we are convinced to do otherwise. -- DrSpike, Skanky Burns, Shogun Gunner
...aisdhieort...dticcok...
hexagonian is offline  
Old December 9, 2002, 14:23   #3
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 13:20
Local Date: November 1, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Re: Scenario Events and stuff
Quote:
Originally posted by Maquiladora
2. If a named unit is killed, how do i make a popup? Like for example if the "HMS Repulse is sunk by the Japanese", when the Japanese attack and sink that particular named unit? It will be a generic unit though (ie unit_battlecruiser) or would i need to create a special unit_hmsrepulse? (that seems overly complicated though for one unti) but it will be killed at game start anyway so...
If you can guarantee it's location at the beginning of the game, then you don't need to define a new unit. If you cannot, then by far the easiest way is to have a UNIT_HMS_REPULSE.

Then you need something like this:
Code:
HandleEvent(BattleAftermath) 'is_hms_repulse_still_around' pre {
     int_t i;
     unit_t tmpUnit;
     int_t here;
     // assuming REPULSE owner is 1
     for(i=0; i < PlayerUnitCount(1); i = i + 1){
         GetUnitByIndex(1, i, tmpUnit);
         if(tmpUnit.type == UnitDB(UNIT_HMS_REPULSE)){
             here = 1;
         }
     }
     if(!here){
          message(1, 'hmsrepulse_dead');
    }
}

messagebox 'hmsrepulse_dead' {
Show();
Title(ID_HMS_REPULSE_DEAD_TITLE);
Text(ID_HMS_REPULSE_DEAD);
}
Quote:
3. How do i spawn units on a given turn, and the make them attack a specific city or tile in the next turn/s?

Without going in to too much detail, you'll need to know the locations they'll be spawned in, do CreateUnit functions for each one (as used in the AtG scen), then store each one, probably best to use a unit array. Then on the next beginturn for their owner, check they're still alive, and use a MoveOrder or Battle order perhaps to force the attack. I don't know if this works properly.
Try looking at Peter Triggs reSLICed WW2 scenario. This might have examples of this kind of thing.
__________________
Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
Immortal Wombat is offline  
Old December 9, 2002, 18:13   #4
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 09:20
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
1.
Code:
HandleEvent(NewProposal) 'StopAllProposals' pre {
	return STOP;
}
Even if the human sends a proposal the diplo screen will close and nothing happens.
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand
Pedrunn is offline  
Old December 9, 2002, 18:17   #5
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 13:20
Local Date: November 1, 2010
Join Date: Jun 2001
Posts: 7,665
Thanks to all Thats got a few out of the way.

Im gonna work a little on my own slic writing while i work on the cosmetics of my scenario so i wont be asking anymore just yet.

By the way, what does cityid.txt do exactly? Been staring at it for the past 2 hours and i still dunno. It wasnt modifed for citymod2 though, so im guessing its defunct or i just wont need to change it.
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old December 9, 2002, 18:17   #6
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 09:20
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
3. Can be done with a variation of the frenzy AI. :

And use three events in a beginTurn handler:
CreateUnit
MovePathOrder (to be close to the city, doenst work properly to move one tile)
MoveOrder (to move inside the city)

__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand
Pedrunn is offline  
Old December 9, 2002, 18:20   #7
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 09:20
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
Quote:
what does cityid.txt do exactly?
Nothing. CTP1 Left over.
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand
Pedrunn is offline  
Old December 9, 2002, 18:32   #8
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 13:20
Local Date: November 1, 2010
Join Date: Jun 2001
Posts: 7,665
Ah okay, good.

One more question, if i create an event for say: if the human player attacks the Neutral Civ they get all gold taken away for 10 turns. But make it so the human can still pay upkeep+wages, but limit them to no rush buying money, perhaps change the gold amount to 100 after the turn has been played ready for next turn. Also i want to prevent the AI from attacking the Neutral Civ, civ number 7.
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old December 9, 2002, 19:12   #9
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 09:20
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
The new Question: UNTESTED and May Contain Syntax errors

Code:
int_t PlayerRemovedGold[];

HandleEvent(BattleAftermath) 'BlaBlaBlabyPedrunn' pre {
int_t tmpGold;
	if(IsHumanPlayer(player[0])) { 
		if (GetEffectiveRegard(player[0], Player[1]) > 300) {
			PlayerRemovedGold[player[0]] = PlayerGold(player[0]);
			AddGold(player[0], -PlayerRemovedGold[player[0]]); 
		}
	}
}

HandleEvent(EndTurn) 'BlaBlaBla2byPedrunn' pre {
	if(PlayerRemovedGold[player[0]] != 0) {
		AddGold(player[0], PlayerRemovedGold[player[0]]);
		PlayerRemovedGold[player[0]]= 0;
	}
}
I gotta adimit i dont like this idea at all .
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand

Last edited by Pedrunn; December 9, 2002 at 19:19.
Pedrunn is offline  
Old December 9, 2002, 20:10   #10
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 13:20
Local Date: November 1, 2010
Join Date: Jun 2001
Posts: 7,665
Dont worry im saving all these

Yeah im not sure about that either, but i dont want to completely stop the player from not being able to attack the neutrals, but i also want to give the human a penalty if they choose to attack at some point, ill see.

Im planning plenty of events, mostly attack/message popup related, but this would provide the human with a good strategic choice too.
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old December 9, 2002, 22:02   #11
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 09:20
Local Date: November 1, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
Quote:
if i create an event for say: if the human player attacks the Neutral Civ they get all gold taken away for 10 turns.
The code removes all the gold from the human player if they attack a nutral civ only for one turn. And thats all it does
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand

Last edited by Pedrunn; December 9, 2002 at 22:08.
Pedrunn is offline  
Old December 10, 2002, 04:22   #12
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 13:20
Local Date: November 1, 2010
Join Date: Jun 2001
Posts: 7,665
Yeah i read that part right then. I guess thats not as bad, but as the human will know the consequences for attacking a neutral nation, they could spend all their money before they attack so it doesnt get taken away.
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old December 10, 2002, 08:11   #13
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 13:20
Local Date: November 1, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
er... is the only other use for gold rush-buying? It would be much easier to prevent that, rather than messing with the amount of gold they actually have.
__________________
Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
Immortal Wombat is offline  
Old December 10, 2002, 08:29   #14
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 13:20
Local Date: November 1, 2010
Join Date: Jun 2001
Posts: 7,665
cross posted abit there

Quote:
Originally posted by Immortal Wombat
er... is the only other use for gold rush-buying? It would be much easier to prevent that, rather than messing with the amount of gold they actually have.
Yeah, i just dont want the human to have the ability to rush buy units if they want to gain an advantage by attacking a neutral. But i think taking away their money for several turns and giving a popup telling them, has more atmosphere, no?
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old December 10, 2002, 08:35   #15
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 13:20
Local Date: November 1, 2010
Join Date: Jun 2001
Posts: 7,665
Or,

If say, Britain attacks a Neutral city, Germany and Japan receive 5000 gold each, sort of like the Neutrals paying for help but no need to deduct the Neutrals money because theyll be unplayable and no one will notice.
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old December 16, 2002, 10:21   #16
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 13:20
Local Date: November 1, 2010
Join Date: Jun 2001
Posts: 7,665
Okay i need good ideas for turnlength.

Currently the scenario lasts 46 months in real life, and i ideally want the scenario to last around 150-500 turns. Just some ideas,

1-8 Jan
9-16 Jan
17-24 Jan
25-31 Jan
1-8 Feb (or 7-14 Feb)
etc
... or

Week 1 Jan
Week 2 Jan
Week 3 Jan
Week 4 Jan
Week 1 Feb (or Week 5 Feb)

Which do you prefer? Keep in mind i want it to last over 150 turns and not anymore than 500, and also each turn to be an equal increment. I cant decide which one i like. Obviously length of the scenario is most important because all the ideas and events will fit around it, not to mention growth and science costs. Any other ideas welcome...
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old December 16, 2002, 11:46   #17
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 13:20
Local Date: November 1, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
the latter
__________________
Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
Immortal Wombat is offline  
Old December 17, 2002, 13:51   #18
centrifuge
Call to Power PBEMCall to Power II MultiplayerCTP2 Source Code Project
Prince
 
centrifuge's Avatar
 
Local Time: 05:20
Local Date: November 1, 2010
Join Date: Apr 2002
Location: USA
Posts: 916
I like the 2nd choice as well... Just looks "cleaner" I guess.
centrifuge is offline  
Old December 17, 2002, 14:20   #19
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 13:20
Local Date: November 1, 2010
Join Date: Jun 2001
Posts: 7,665
Okay that one it is. Although itll have to be,

Wk 2 Dec 1941
Wk 3 Dec 1941
Wk 4 Dec 1941
Wk 1 Jan 1942

so the year fits in the little turn box.

A new question: How do i stop all players from changing government? Aside from giving them all seperate advances for each of their governments. Ideally through nice clean slic code.
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old December 17, 2002, 15:12   #20
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 13:20
Local Date: November 1, 2010
Join Date: Jun 2001
Posts: 7,665
Okay nevermind i figured out a way to do it. Ill give each nation a new strategy in strategies.txt and define only one government for each. Like it was done in the Activison ww2 one. I was gonna give each government a new strategy anyway so...
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old December 18, 2002, 17:04   #21
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 13:20
Local Date: November 1, 2010
Join Date: Jun 2001
Posts: 7,665
How do i immediately start a new line in a messagebox? Is it possible?
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old December 18, 2002, 20:26   #22
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 13:20
Local Date: November 1, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Insert \n for a line break. Locutus mentions it in the SLIC oddities thread
__________________
Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
Immortal Wombat is offline  
Old December 18, 2002, 20:55   #23
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 13:20
Local Date: November 1, 2010
Join Date: Jun 2001
Posts: 7,665
I should read more. ta
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old December 19, 2002, 01:06   #24
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 13:20
Local Date: November 1, 2010
Join Date: Jun 2001
Posts: 7,665
Does \t actually work for TAB? Only when i used it it seemed to move the line left instead, sometimes even left off the edge of the messagebox window.
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old December 19, 2002, 13:52   #25
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 13:20
Local Date: November 1, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
I've never tried it personally. A string of spaces usually serves.
__________________
Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
Immortal Wombat is offline  
Old December 19, 2002, 14:05   #26
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 13:20
Local Date: November 1, 2010
Join Date: Jun 2001
Posts: 7,665
Yeap, using that now.
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old December 19, 2002, 18:00   #27
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 14:20
Local Date: November 1, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
Well, I never tested the \t properly, only once or twice and it seemed okay. I wouldn't be surprised at all if it was buggy - trying to combine C and SLIC never sounded like a particularly good idea to me in the first place - that's like asking begging for trouble

BTW, do you mind if I move the citystyle related posts to a seperate thread? It contains some *very* useful info but for future reference it would be much easier to find if it was in a seperate thread rather than as part of a big and general discussion like this one...
__________________
Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery
Locutus is offline  
Old December 19, 2002, 18:30   #28
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 13:20
Local Date: November 1, 2010
Join Date: Jun 2001
Posts: 7,665
Quote:
Originally posted by Locutus
BTW, do you mind if I move the citystyle related posts to a seperate thread? It contains some *very* useful info but for future reference it would be much easier to find if it was in a seperate thread rather than as part of a big and general discussion like this one...
Yeah go ahead, my threads always seem to meander off into other subjects but then i suppose most threads do that in this forum.
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old December 27, 2002, 10:07   #29
Maquiladora
Call to Power II MultiplayerCTP2 Source Code ProjectCall to Power PBEMCall to Power Multiplayer
Emperor
 
Local Time: 13:20
Local Date: November 1, 2010
Join Date: Jun 2001
Posts: 7,665
Okay after placing more cities and tile imps than i care to count i can start building some events for this thing, so things which i would like to use;

1. Spawn unit/s at given location on a given turn for a certain Civ and group all units at location into an army.

2a. Move an army on a given turn to attack another enemy army.
2b. Move an army on a given turn and bombard a city or enemy army.

3. well im sure there will be...

Ive looked through all existing scenarios but couldnt find anything clear with these. Can anyone give me some simple pointers on doing these?
__________________
Call to Power 2: Apolyton Edition - download the latest version (7th June 2010)
CtP2 AE Wiki & Modding Reference
One way to compile the CtP2 Source Code.
Maquiladora is offline  
Old December 27, 2002, 12:00   #30
Martin Gühmann
staff
Call to Power II Democracy GameCall to Power Democracy GameCTP2 Source Code Project
Super Moderator
 
Martin Gühmann's Avatar
 
Local Time: 14:20
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
I have here a piece of code that was able to make an army to attack a city that is on a neighbor tile of that city. I tried something like this recently. But I failed as far as I figured it out I wasn't able to group the just created units into one army.


Code:
void_f MG_SendTroopsTo(location_t theLoc, location_t theGoal) {
location_t MGLoc;
location_t MGGoal;
army_t MGArmy;
unit_t MGUnit;
MGLoc  = theLoc;
MGGoal = theGoal;
	if (GetUnitsAtLocation (MGLoc)>0) {
		Event:ActivateAllUnits(MGLoc);
		GetUnitFromCell(MGLoc, 0, MGUnit);
		GetArmyFromUnit(MGUnit, MGArmy);
		Event:Battle(MGArmy, MGGoal);
		message(1,'MG_TestMessage');
		message(MGArmy.owner,'MG_TestMessage');
	}
}
If you want to group all units at agiven location into one army you could use this event:

GroupOrder(army_t);

But note that you can't do anything with this army on the same turn, because all the events are executed afterwards the current event handle and all called events before were executed.

For the rest I suggest to consult also slci code that is not part of scenarios, the BetteraAI code contains some stuff about grouping single units into an army and has also some stuff about moving armies if you want to make the army to attack someone you needs the battle event.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 08:20.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team