HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

(Auto Production: HELP!!)

01-23-2004, 03:32 AM#1
The_Inquisitor3
I almost finish my big proyect... but 1 more trigger is missing... i need to auto produce Random units from the barracks/arcane and all buildings controlled by the Computer ... i mean.. the computer have barracks and other buildings and i just need to make the computer auto produce diferent types of units forever... they have they own orders when they finish the training...

(I try using IA Scrips trigger but its not working)

Pics from my map
01-23-2004, 03:36 AM#2
The_Inquisitor3
another pic here...
01-23-2004, 03:49 AM#3
Grater
This trigger may be useful.
Code:
Autobuild
    Events
        Unit - A unit Finishes training a unit
    Conditions
    Actions
        Unit - Order (Triggering unit) to train/upgrade to a (Unit-type of (Trained unit))

It basically replenishes the queue of a construction building. So if you order a barracks to build a footman, it'll build more footmen forever. If you order it to build a footman and rifleman it'll alternate between footmen and riflemen forever... assuming resource availability.

If random units is what your dead set on try something like this:
Code:
Autobuild
    Events
        Unit - A unit Finishes training a unit
    Conditions
        (Unit-type of (Triggering unit)) Equal to Barracks
    Actions
        Set RandomNumber = (Random integer number between 1 and 3)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                RandomNumber Equal to 1
            Then - Actions
                Unit - Order (Triggering unit) to train/upgrade to a Footman
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        RandomNumber Equal to 2
                    Then - Actions
                        Unit - Order (Triggering unit) to train/upgrade to a Rifleman
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                RandomNumber Equal to 3
                            Then - Actions
                                Unit - Order (Triggering unit) to train/upgrade to a Knight
                            Else - Actions
01-23-2004, 03:54 AM#4
The_Inquisitor3
ok this is other stuff that i want to do.... when a barrack its destroyed, another neutral barrack will be given to the afected player and will auto start the production of units as soon as possible.... (using Pre defined buildings... Example: barrack001 Dies. action: Change onwnership of barrack002 to player X and change color" That will work? any good working ideas??


(what do u think about the pictures??)