 |
|  |
 |
|
Martin the Dane
|
 |
Aarhus, Denmark
Feb 2000 time: 06:24
|
|
Not exactely, but thanks for the xls, that's usefull stuff.
What I'm looking for is something like this:
code:
HandleEvent(SetPiratingArmy) 'My_Pirating_handler' post{
GEA_TradeRoute The_TradeRoute;
The_TradeRoute = My_Pirating_handler.arguments[0];
Event:KillTradeRoute(The_TradeRoute,0);
}
This however does not work (ctp2 won't load it), so how do I get the affected traderoute?
Acording the refference the SetPiratingArmy event needs two arguments the first being of type? GEA_TradeRoute, the second being the army doing the pirating. So my thougtht was, that if the event gets the arguments the handler sould know about them, and thus I should be able to access them.
Edit: corrected typo.
Last edited by Martin the Dane on 31-12-2002 at 18:29
|
|
|  |
 |
|  |
 |
|
Martin Gühmann
|
 |
Berlin, Germany
Mar 2001 time: 06:24
|
|
quote: Originally posted by Peter Triggs
Martin G, where'd the traderoute array come from. I don't think I've ever seen it before. Do you know what members it has, if any? |
There is no traderoute array otherwise the code would have been accepted by CTP2. I tried some other types of variables, the KillTradeRoute event accepted, an int, an army, a location and a city variable, probably it accepts also a unit variable but I didn't tried this. Fact is that I was able to fill the first argument with whatever type I wanted, without any error message, at least I expected something like a error message that this event expects a traderoute_t variable like the ImprovementComplete event that expects as first argument a improvement_t variable, the improvement array is valid but doesn't work here.
-Martin
|
|
|  |
 |
|
Meitnerium
|
|
California
Aug 2002 time: 21:24
|
|
Thanks for the answer. I was hoping that using roads/railroads I would be able to position trade routes in a more logical manner. (Avoiding enemy territory, water, etc.) Also, I think its just simply more accurate to have trade routes follow along roads, railroads, rivers, etc. rather than just the shortest line between two points regardless of terrain. (And it makes the trade route dislpay in ctp2 a cluttered mess.) Too bad the freight/terrain movement costs were taken out of ctp2...
|
|
|  |
 |
|  |
All times are GMT. The time now is 05:24. Apolyton Time is 00:24. |
top of page
|
| archivepost |
|
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
|
|
|
|
|
|