Thread Tools
Old November 10, 2002, 17:23   #1
ahenobarb
Prince
 
ahenobarb's Avatar
 
Local Time: 10:47
Local Date: November 1, 2010
Join Date: Nov 2001
Posts: 437
Unit Orders
How is it possible to find out if a unit has been given an order?

What I want to do is run a check each turn to find out if a unit has already been given a pathed move order. If it doesn't have a pathed move order, I want to give it one. But I don't want to give it one if it already has one.

Anyone have any ideas?
ahenobarb is offline  
Old November 10, 2002, 18:02   #2
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 11:47
Local Date: November 1, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
There's a MovePathOrder event in SLIC. You'd probably have to hold all the units in an array, and check each turn if they have a move order. I'm not entirely sure how the move ordering works, but its a starting point...
__________________
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 November 10, 2002, 18:52   #3
ahenobarb
Prince
 
ahenobarb's Avatar
 
Local Time: 10:47
Local Date: November 1, 2010
Join Date: Nov 2001
Posts: 437
Quote:
Originally posted by Immortal Wombat
There's a MovePathOrder event in SLIC. You'd probably have to hold all the units in an array, and check each turn if they have a move order. I'm not entirely sure how the move ordering works, but its a starting point...
Thanks, IW. I've already tried several different arrays, but they won't do the trick. I'll have to find a different work around. Oh well, back to the drawing board.
ahenobarb is offline  
Old November 10, 2002, 19:35   #4
Peter Triggs
CTP2 Source Code ProjectCivilization IV Creators
King
 
Local Time: 10:47
Local Date: November 1, 2010
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
IMO, anything to do with moving units is a pain in the neck.

I *think* the move order:

Quote:
MoveOrder(army_t, GEA_Path, location_t, int_t)
triggers when army[0] makes one move along the given GEA_Path. But as I recall, when I tried to write a handler that watched for this so that I could change their orders, I ran into trouble (can't remember what happened).

If you're trying to move AI armys that aren't doing anything, try the Entrench event. The AI will entrench armys when it's got nothing better to do with them.
Peter Triggs is offline  
Old November 11, 2002, 22:05   #5
Peter Triggs
CTP2 Source Code ProjectCivilization IV Creators
King
 
Local Time: 10:47
Local Date: November 1, 2010
Join Date: Jan 2000
Location: Gone Fishin, Canada
Posts: 1,059
I forgot to ask: What are you working on?
Peter Triggs is offline  
Old November 12, 2002, 13:47   #6
ahenobarb
Prince
 
ahenobarb's Avatar
 
Local Time: 10:47
Local Date: November 1, 2010
Join Date: Nov 2001
Posts: 437
Quote:
Originally posted by Peter Triggs
I forgot to ask: What are you working on?
A Rome mod. No big whup. I'm tackling the most difficult problems first to see what will be the limits of what can be done. I don't want it to get array heavy otherwise it will take 10 minutes to cycle a turn.

The question below was about a low priority wishlist addition. If it requires another array, forget it.
ahenobarb is offline  
Old November 24, 2002, 14:10   #7
FRITZ
Settler
 
Local Time: 10:47
Local Date: November 1, 2010
Join Date: Nov 2001
Location: Berlin-Germany
Posts: 24
Some ideas to check the slic and the move-path of armies:

I had the same problem some month ago.
When I prepared my first slic program I build in a message-box command. This helped me to see if a line in slic works. If the message-box (in the game) appears the program works to that line.
If you clear the fog of war - you can see the move path orders of units from all nations.

I have build up a very simple scenario to check my slic-codes (slic-tester on my homepage). It was useful for me to learn slic- movements through very simple commands (e.g. I let all units of the game go to the south or to the north or to a special declared point).

Locutus and Dale are the great slic experts of ctp2 you find a lot of stuff in Locutus `Guide to Slic for ctp2`'

Fritz
FRITZ is offline  
Old November 24, 2002, 18:32   #8
Dale
Emperor
 
Dale's Avatar
 
Local Time: 20:47
Local Date: November 1, 2010
Join Date: Dec 2000
Posts: 3,944
Quote:
Originally posted by FRITZ
When I prepared my first slic program I build in a message-box command. This helped me to see if a line in slic works. If the message-box (in the game) appears the program works to that line.
I use these to see when if(..) statements become true. I've caught many bugs by using this technique.

Quote:
Locutus and Dale are the great slic experts of ctp2 you find a lot of stuff in Locutus `Guide to Slic for ctp2`'

Fritz
Gee..... now I'm blushing......
Dale 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 06:47.


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