Thread Tools
Old February 6, 2003, 14:14   #1
ahenobarb
Prince
 
ahenobarb's Avatar
 
Local Time: 15:50
Local Date: November 1, 2010
Join Date: Nov 2001
Posts: 437
Bug Out!
What are the two int's in the MoveArmy command for? I've put different numbers in there without any effect.

MoveArmy(army_t, int_t, int_t, int_t, location_t)
Move an army one square

Usually I use MoveUnits, but I thought perhaps I could get some extra functionality here.
ahenobarb is offline  
Old February 6, 2003, 14:27   #2
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: 17:50
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Well you could do what Ben did in the Knee-Deep in SLIC thread triger an message box on the MoveArmy event that contains the values of these int I think to access these ints you have to use value[0] and value[0]. So you would get a number that tell you if it do anything.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old February 6, 2003, 17:36   #3
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 16:50
Local Date: November 1, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Could be directions or something, since its a one-square move only. Try what Martin suggests, only value[0] and value[1] may prove more effective
__________________
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 February 6, 2003, 20:13   #4
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: 17:50
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Maybe I should quote again the slic documention:

Quote:
MoveArmy(army_t, int_t, int_t, int_t, location_t)
Move an army one square
So the first int is the direction in that the army moves that should vary from 0 to 7. The other both are still a mystery. Well I have to admit that I overlooked the third one that should be accessed with value[0] .

The only example of triggering this event I found was in one of my experimental slic files here is the line:

Event:MoveArmy(MGArmy2, k, 1000, 1000, MGLoc);

k contains the direction, the other two ints are set very high probably they don't do anything, but test it with the messagebox.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old February 6, 2003, 20:54   #5
Peter Triggs
CTP2 Source Code ProjectCivilization IV Creators
King
 
Local Time: 15:50
Local Date: November 1, 2010
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
Quote:
Usually I use MoveUnits, but I thought perhaps I could get some extra functionality here.
You've got that to work? When I tried generating MoveUnit events, IIRC I ran up against a problem with it leaving a zone of control (invisably) behind. I think Locutus noticed this too.
Peter Triggs is offline  
Old February 7, 2003, 11:25   #6
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: 17:50
Local Date: November 1, 2010
Join Date: Mar 2001
Location: Tübingen, Germany
Posts: 6,206
Quote:
MoveUnits(army_t, location_t, location_t)
An army always moves on this event, no more legality checks at this point
Another problem if you trigger the MoveUnits event is that there aren't no more legacy checks on this point. So if you think the army shouldn't be moved if it doesn't has enough move points then you have to do it on your own. But that is actual not the problem, you get trouble if the target location contains more then 12 units after the MoveUnits event. The units above the limit are be killed. Actual also a result that is not too strange, but it moves also an army into a city that does not belong to the same civilsation as the army. This event also allows to move units of different civilisations into one quare so that you can group them to a new army, but don't try to move this multinational stack then the game will crash. Probably this event will also move land armies into the ocean without killing them. I didn't test this as I did this legacy check before.

-Martin
__________________
Civ2 military advisor: "No complaints, Sir!"
Martin Gühmann is offline  
Old February 7, 2003, 14:12   #7
ahenobarb
Prince
 
ahenobarb's Avatar
 
Local Time: 15:50
Local Date: November 1, 2010
Join Date: Nov 2001
Posts: 437
Wow!

I never thought about those problems with MoveUnits before Martin, I better review some code to make sure I haven't created some problems.

I've used this line for MoveArmy:

Event:MoveArmy(Army[0], x, 0, 0, tmpLoc);

x is the location of the move, but the other two ints don't seem to do anything. I was thinking that one might be for number of squares (but this is contradicted by the description of the event), perhaps the second number of units from the army. But neither of these are the case. It's a mystery I guess, I was hoping someone out there had cracked it's secret.
ahenobarb 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 11:50.


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