HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

If: Region with offset contains unit of specific type.

07-01-2005, 09:19 PM#1
Lej
Been fooling around some in the editor after a long time and I'm having trouble setting up a condition that something like this:

If: Region offset by X,Y contains a Structure equal to true.

Then: Blah.

Else: Other Blah.

I'm not sure I can set up a condition like that with only one condition. Anyone could help me out? I was trying something like:

Code:
((Player1 Area <gen> offset by (X), (Y) contains [b]No unit[/b]) Equal to True

But that contains No unit can only be No unit or Different Event responses not a type of unit? :(
07-01-2005, 10:28 PM#2
Tim.
What about..
Code:
Unit Group - Pick every unit in (Units in Player1 Area <gen>) and do (Actions)
    Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Picked unit) is A structure) Equal to True
            Then - Actions
                 <Actions here>
            Else - Actions
                 <Else actions here>

Its not very good, but im in a hurry. It should give you the idea of what you can do though.
07-02-2005, 12:49 AM#3
Lej
Arr.. How did I forget about pick every unit ^_^
Got it to work. Thanks.