Scripting Problem, creating several Units


Jan 30, 2002
Monaco di Baviera!
Hi there,

Can anybody here give me a hand with this? I stumbled over a quite disturbing problem in the event files in MGE:

In my new scenario, I want to create more than one same Unit in the same event, but only the very first unit will ACTUALLY be created !!!

All the others- be it in the same city, or in different cities- will just be ommited and I now have to write so many extra events (per unit) that I am running out of event code space!!!

I have tried other locations on the map, other city squares, other terain squares, but nothing seems to work...

Please help, or give some advice,

Thx for reading,

:king: :cooool: :king:
I'm afraid that's the way it is. Most people do not create many units of the same type on one turn. Rather, they use some trigger to create one unit everyturn for many turns. Usually the way of 'turning off the tap' is to change the terrain where the unit will appear to sea or choose a spot where the player will eventually occupy with one of his own units (like a city or other special location).

Another way is to make the trigger the destruction of the same unit. Then the number of those units will be constant.
I c... hmmm- problem is I wanted to make the capture of a city (actually various) into the trigger for the attacker to get some unique units- oh well- I'll start looking for my ToT version...

... but I think that one is in Mexico right now (whereas I am in the UK, talking about fun...)

many Thx for reading and greetings to Singapore,

ps. oh, another thing- do U know how to change the max units on the map- cuz thats the next thing on my agenda... ???

:king: :king: :king:
think that MGE event.txt can'T have more than 1 "same" event option (1 text+1 createunit +1 playwavfile, ok but not 2 text or 2 createunit...) by IF/THEN/ENDIF

if u are running out of event code space, just use mor than 1 event.txt ! it can simply be done with just a savegame / clic on a *.bat file / reload game

TOT can build more than 1 unit by IF..ENDIF
with the "COUNT=(1-255)" parameter (one of the new event.txt possibilities for TOT)
2nd advantage of this COUNT parameter, units will not all be create on 1 location if u use more than 1 location coordinates !
If what I think you're going to try is correct then
No, no, no! ToT event scripting will not work with anything but ToT.
Hmmm- seems like it... apparently the scripting of ToT is compatible with the one in MGE, but doesnt trigger the effects either.

I tried several combinations, the results varying from either non response to the trigger, to issuing of the same event (only one of 3 units created), finally something funny happened:

Only the Last Unit in the list was created (dont ask how that went through)...

Thx for reading,

:king: :king: :king:
What you can only do to bring MANY units in ONE turn into game is to use MANY "if turn event" with many "then createunit trigger" in events.txt.
However this way you consume MANY events file space, so perhapes you will be forced to use multi-events files in scenario (via batch file). No other way to acquire your aim in versions other than TOT.
The problem with various "same trigger" similar effect useage (i.e same trigger creates same unit on different locations in the same turn) is that it takes up too much event space while i am running out- call it a cosmetic enhancement i would like 2 do...


:king: :king: :king:
Top Bottom