HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

"Blight" Like Building - Having Issues

03-14-2005, 05:19 AM#1
Pheonix-IV
Alrighty, for a map i'm attempting to make i had an idea for building. You can construct these "Flags" or banners that have an aura that goes around them for a certain radius. You can then build other buildings inside this aura. Originally i had it so when the building was beginning construction it checked to see if the building had the aura buff, but it turns out the buff takes a second or two to appear. So i'm back to square one. I need a simple, multi-player way (preferably in GUI) to do this. Any help is appriciated.

--EDIT--

I tried to use this trigger, but it dosnt work.
Code:
Begin Construction
    Events
        Unit - A unit Begins construction
    Conditions
        And - All (Conditions) are true
            Conditions
                (Unit-type of (Constructing structure)) Not equal to Dutch Standard
                (Unit-type of (Constructing structure)) Not equal to English Standard
                (Unit-type of (Constructing structure)) Not equal to French Standard
                (Unit-type of (Constructing structure)) Not equal to Spanish Standard
                (Unit-type of (Constructing structure)) Not equal to Keep
                (Owner of (Constructing structure)) Not equal to Player 9 (Gray)
                (Owner of (Constructing structure)) Not equal to Player 10 (Light Blue)
                (Owner of (Constructing structure)) Not equal to Player 11 (Dark Green)
                (Owner of (Constructing structure)) Not equal to Player 12 (Brown)
    Actions
        Unit Group - Pick every unit in (Units within 1300.00 of (Position of (Constructing structure))) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Or - Any (Conditions) are true
                            Conditions
                                (Unit-type of (Picked unit)) Equal to Keep
                                (Unit-type of (Picked unit)) Equal to Castle
                                (Unit-type of (Picked unit)) Equal to Fortress
                                (Unit-type of (Picked unit)) Equal to Dutch Standard
                                (Unit-type of (Picked unit)) Equal to English Standard
                                (Unit-type of (Picked unit)) Equal to French Standard
                                (Unit-type of (Picked unit)) Equal to Spanish Standard
                    Then - Actions
                        Set HowManyAuradUnits = (HowManyAuradUnits + 1)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                HowManyAuradUnits Greater than or equal to 1
                            Then - Actions
                                Do nothing
                            Else - Actions
                                Unit - Kill (Constructing structure)
                                Game - Display to (Player group((Owner of (Constructing structure)))) the text:                    ...
                    Else - Actions
                        Do nothing
03-14-2005, 08:16 AM#2
Strategy Master
shouldn't u set variable sethowmanyunits to 0 at start of trigger before the pick every unit action otherwise it always going to increase and always be greater than 1.

I also having this gut feeling that u have to kill building after waiting a certain amount of time... a second or slightly less.
03-15-2005, 05:25 AM#3
Pheonix-IV
I'll try that, yeah your right about the sethowmany units stuff, but it dosnt even work on the first run (outside of the AE)

--EDIT--

Code:
Begin Construction
    Events
        Unit - A unit Begins construction
    Conditions
        And - All (Conditions) are true
            Conditions
                (Unit-type of (Constructing structure)) Not equal to Dutch Standard
                (Unit-type of (Constructing structure)) Not equal to English Standard
                (Unit-type of (Constructing structure)) Not equal to French Standard
                (Unit-type of (Constructing structure)) Not equal to Spanish Standard
                (Unit-type of (Constructing structure)) Not equal to Keep
                (Owner of (Constructing structure)) Not equal to Player 9 (Gray)
                (Owner of (Constructing structure)) Not equal to Player 10 (Light Blue)
                (Owner of (Constructing structure)) Not equal to Player 11 (Dark Green)
                (Owner of (Constructing structure)) Not equal to Player 12 (Brown)
    Actions
        Set HowManyAuradUnits = 0
        Unit Group - Pick every unit in (Units within 1300.00 of (Position of (Constructing structure))) and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Or - Any (Conditions) are true
                            Conditions
                                (Unit-type of (Picked unit)) Equal to Keep
                                (Unit-type of (Picked unit)) Equal to Castle
                                (Unit-type of (Picked unit)) Equal to Fortress
                                (Unit-type of (Picked unit)) Equal to Dutch Standard
                                (Unit-type of (Picked unit)) Equal to English Standard
                                (Unit-type of (Picked unit)) Equal to French Standard
                                (Unit-type of (Picked unit)) Equal to Spanish Standard
                    Then - Actions
                        Set HowManyAuradUnits = (HowManyAuradUnits + 1)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                HowManyAuradUnits Greater than or equal to 1
                            Then - Actions
                                Do nothing
                            Else - Actions
                                Unit - Remove (Constructing structure) from the game
                                Game - Display to (Player group((Owner of (Constructing structure)))) the text:                    ...
                    Else - Actions
                        Do nothing

But its still not working (i tried removing the conditions so it removed any building that was built, it worked, so its in the conditions somewhere.)
03-15-2005, 07:52 AM#4
Strategy Master
Odd.

Myabe u were testing as player 9, 10 11 or 12 :o

Thats only reason those conditions could fail there.


Also i noticed that the if then else statement for "howmanyauraunits >= 1" shouldn't be in the loop. Move it outside the pick every unit action. See if that works.
Cause basically the if statement runs if it detects an aura unit so means the condition for if will always fail. Complicated logic :\
03-19-2005, 11:53 PM#5
Guest
Try making a trigger that runs when a building begins construction. Make a condition checking that it is the right building, then a wait action. Then, make an action which runs your originlal trigger. This should give it time for the buff to take effect. ^_^
03-20-2005, 12:01 AM#6
Anitarf
Quote:
Originally Posted by Strategy Master
Odd.

Myabe u were testing as player 9, 10 11 or 12 :o

Thats only reason those conditions could fail there.


Also i noticed that the if then else statement for "howmanyauraunits >= 1" shouldn't be in the loop. Move it outside the pick every unit action. See if that works.
Cause basically the if statement runs if it detects an aura unit so means the condition for if will always fail. Complicated logic :\
Yes, definitely move the if out of the loop. Otherwise, unless the first unit picked is a flag, the trigger should kill the building even if there are flags in range. And I suppose that when checking nearby units, you only want the player's flags/fortresses to count, not those that belong to all players (like it's set up now).