Checking structure placement with 'Begins construction'

CYBER_Aeon

New Member
Reaction score
11
Can somebody help me with this trigger? I have a series of structures that have no collision box, which unfortunately means that other structures can be built on top of them. So instead, i've decided to write a trigger that detects when a structure is about to be built on top of another structure, and cancel that construction.

For some reason though, this trigger doesn't seem to be firing. At all.

(Note: The check radius is properly a bit large at the moment, and the point value is the actual worth of the item, so those two components are expected)

Code:
Small Radius Safety
    Events
        Unit - A unit Begins construction
    Conditions
        (Unit-type of (Constructing structure)) Equal to Cage
        (Unit-type of (Constructing structure)) Equal to Barrier Marker
        (Unit-type of (Constructing structure)) Equal to Tower Marker
        (Unit-type of (Constructing structure)) Equal to Trap Marker
    Actions
        Set tmpUnits = (Units within 180.00 of (Position of (Constructing structure)))
        Unit Group - Pick every unit in tmpUnits 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
                        Game - Display to (Player group((Owner of (Triggering unit)))) the text: |CFFFF6666You canno...
                        Player - Add (Point-value of (Constructing structure)) to (Owner of (Constructing structure)) Current gold
                        Unit - Kill (Constructing structure)
                        Skip remaining actions
                    Else - Actions

+Rep to anybody who can make this stupid trigger work.
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
sure you dont gonna use Or funktion on Conditions? maybe i just freaking around but not sure a trigger can run if you got 4 conditions of same constructing building
 

CYBER_Aeon

New Member
Reaction score
11
Tried. Couldn't get it to work for some stupid reason.

The whole point is so that when you build a invisible trap, enemies and friendlies can still walk over it. Problem was, when I set it that way, I could also BUILD on top of it. Which... wasn't a good solution. Nobody else was able to tell me how to fix that, so I ended up resorting to triggers. It's better than nothing for now.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
I guess you could give the pathing map used on "Circle of Power" a try.
Come in three different sizes, they are walkable and unbuildable.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,494
What exactly isn't working there?


In the map here, Farms can not be built on top of
- other farms
- other buildings
- trees
- unbuildable terrain

Normal buildings can not be built on top of farms.

You can easily walk through the farms and you can attack them.
 

Attachments

  • BuildWalk_Demo_AceHart.w3x
    13.2 KB · Views: 58

CYBER_Aeon

New Member
Reaction score
11
Thanks AceHart. I'll take a look at that in a little bit.

I suspect part of my problem is because i've flagged the structures so they can only be built on unbuildable terrian, and not buildable (to keep the dungeon feel, the top of the walls are all dirt, and the floor of the dungeon is tile)

And since i'm not real good at replacing pathing maps, I think that's where I tripped up.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top