1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Fill your cup and take your pick among the maps best suited for this year's Hive Cup. The 6th Melee Mapping Contest Poll is up!
    Dismiss Notice
  3. Shoot to thrill, play to kill. Sate your hunger with the 33rd Modeling Contest!
    Dismiss Notice
  4. Do you hear boss music? It's the 17th Mini Mapping Contest!
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Perfect Walls V:4.0

Submitted by ThisPOT
This bundle is marked as approved. It works and satisfies the submission rules.
Builds walls that automatically "cling" to each other, creating nice barriers without needing two different "horizontal" and "vertical" walls but just using the one wall.

This will do it on its' own, also allowing players to create non vertical or horizontal fortifications (diagonal).

System is EXTREMELY simple, just takes a little bit of math.

Very easy to customize for newbs ;)...

Enjoy!

EDIT: Forgot to mention it's 100% GUI friendly and is a good way to learn something about points


VERSION 4: New possibility of limiting the angles to ONLY horizontal and vertical for those who complained of it becoming "ugly" when having to patch up due to players not placing their walls right.


PLEASE RATE!

Keywords:
Walls, Wall, System
Contents

Just another Warcraft III map (Map)

Reviews
Moderator
02:20, 22nd Jul 2012 Magtheridon96: Approved. Despite the code size, this is a pretty cool resource.
  1. 02:20, 22nd Jul 2012
    Magtheridon96: Approved.
    Despite the code size, this is a pretty cool resource.
     
  2. ThisPOT

    ThisPOT

    Joined:
    Feb 23, 2009
    Messages:
    570
    Resources:
    3
    Spells:
    3
    Resources:
    3
    V 4 triggers

    Initialization

    • Ini
      • Events
        • Map initialization
      • Conditions
      • Actions
        • Set Wall_Fake = Wall FAKE (with diagonals)
        • Set Wall_Fake2 = Wall FAKE
        • Set Wall_True = Wall TRUE
        • -------- Set ANGLE of BASE MODEL: Vertical = 0 / Horizontal = 90 / Diagonal = 45 OR 225 --------
        • Set Wall_Angle = 90.00




    Finishes Construction

    • Finishes Construction
      • Events
        • Unit - A unit Finishes construction
      • Conditions
      • Actions
        • Set Unit_A = (Triggering unit)
        • Set Real_A = (Life of Unit_A)
        • Set Player_A = (Owner of Unit_A)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Unit-type of Unit_A) Equal to Wall_Fake
          • Then - Actions
            • Set Point_A = (Position of Unit_A)
            • Unit - Remove Unit_A from the game
            • Set Group_A = (Units within 150.00 of Point_A matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Wall_True)))
            • Unit Group - Pick every unit in Group_A and do (Actions)
              • Loop - Actions
                • Set Unit_A = (Picked unit)
                • Set Point_B = (Position of Unit_A)
                • Set Real_B = (Life of Unit_A)
                • Unit - Remove Unit_A from the game
                • Unit - Create 1 Wall_True for Player_A at Point_B facing ((Angle from Point_A to Point_B) + Wall_Angle) degrees
                • Unit - Set life of (Last created unit) to Real_B
                • Custom script: call RemoveLocation(udg_Point_B)
            • Set Point_B = (Position of Unit_A)
            • Unit - Create 1 Wall_True for Player_A at Point_A facing ((Angle from Point_A to Point_B) + Wall_Angle) degrees
            • Unit - Set life of (Last created unit) to Real_A
            • Custom script: call RemoveLocation(udg_Point_A)
            • Custom script: call RemoveLocation(udg_Point_B)
            • Custom script: call DestroyGroup(udg_Group_A)
          • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Unit-type of Unit_A) Equal to Wall_Fake2
          • Then - Actions
            • Set Point_A = (Position of Unit_A)
            • Unit - Remove Unit_A from the game
            • Set Group_A = (Units within 150.00 of Point_A matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Wall_True)))
            • Unit Group - Pick every unit in Group_A and do (Actions)
              • Loop - Actions
                • Set Unit_A = (Picked unit)
                • Set Point_B = (Position of Unit_A)
                • Set Real_B = (Life of Unit_A)
                • Unit - Remove Unit_A from the game
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • Or - Any (Conditions) are true
                      • Conditions
                        • (Angle from Point_A to Point_B) Equal to 0.00
                        • (Angle from Point_B to Point_A) Equal to 0.00
                        • (Angle from Point_A to Point_B) Equal to 180.00
                        • (Angle from Point_B to Point_A) Equal to 180.00
                  • Then - Actions
                    • Set Wall_Angle2 = Wall_Angle
                  • Else - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • Or - Any (Conditions) are true
                      • Conditions
                        • (Angle from Point_A to Point_B) Equal to 90.00
                        • (Angle from Point_B to Point_A) Equal to 90.00
                        • (Angle from Point_A to Point_B) Equal to 270.00
                        • (Angle from Point_B to Point_A) Equal to 270.00
                  • Then - Actions
                    • Set Wall_Angle2 = (Wall_Angle + 90.00)
                  • Else - Actions
                • Unit - Create 1 Wall_True for Player_A at Point_B facing Wall_Angle2 degrees
                • Unit - Set life of (Last created unit) to Real_B
                • Custom script: call RemoveLocation(udg_Point_B)
            • Unit - Create 1 Wall_True for Player_A at Point_A facing Wall_Angle2 degrees
            • Unit - Set life of (Last created unit) to Real_A
            • Custom script: call RemoveLocation(udg_Point_A)
            • Custom script: call RemoveLocation(udg_Point_B)
            • Custom script: call DestroyGroup(udg_Group_A)
          • Else - Actions
     
    Last edited by a moderator: Aug 7, 2012
  3. Tank-Commander

    Tank-Commander

    Spell Reviewer

    Joined:
    May 26, 2009
    Messages:
    1,538
    Resources:
    44
    Packs:
    1
    Spells:
    41
    Tutorials:
    2
    Resources:
    44
    Well it certainly works and is useful, Although if you misplace a single fence it can make correcting your mistake pretty difficult, but I still like it, really simple though.
     
  4. ThisPOT

    ThisPOT

    Joined:
    Feb 23, 2009
    Messages:
    570
    Resources:
    3
    Spells:
    3
    Resources:
    3
    You definitely can mess up the look, but the pathing is always there :) that's why I used squares as opposed to rectangles.
     
  5. Jazztastic

    Jazztastic

    Joined:
    Apr 4, 2011
    Messages:
    904
    Resources:
    7
    Spells:
    6
    Tutorials:
    1
    Resources:
    7
    Lol did you screencap your triggers? You can just right click the little white part at the top and hit "copy as text" and it'll get the whole thing for you. Just hit the trigger tag on the top of the post editor and paste the trigger. It'll make life soooo much easier.
     
  6. Dr. Boom

    Dr. Boom

    Joined:
    May 1, 2008
    Messages:
    1,549
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    Moin moin =)

    Wait no. Okay this system is a useful one, but not in this case. I just wondering how you calculate the angle of the wall? When my builder has an angle of 0, then I want a vertical wall with angle 0 too, but I get the weired things.

    Also the calculate of the wall connection is strange, because I get the weired things but actually not that what I want. I mean just try to create a normal 4x4 square.

    So actually .. I don't know what I should think about this system.

    Greetings and Peace
    Dr. Boom
     
  7. .OmG.

    .OmG.

    Joined:
    May 9, 2010
    Messages:
    256
    Resources:
    2
    Spells:
    2
    Resources:
    2
    What about adding abilities to a wall to rotate it?
     
  8. ThisPOT

    ThisPOT

    Joined:
    Feb 23, 2009
    Messages:
    570
    Resources:
    3
    Spells:
    3
    Resources:
    3
    I just took a screenshot lol, quick enough :)

    I know it isn't perfect, and it sometimes look a little ugly, but that's because of the simplicity of the system (which is the point).

    What I would need for a "really" perfect wall system, is L and X share wall.

    Moin moin =)

    Wait no. Okay this system is a useful one, but not in this case. I just wondering how you calculate the angle of the wall? When my builder has an angle of 0, then I want a vertical wall with angle 0 too, but I get the weired things.

    I don't think you get the system, you only change the angle when it isn't right, for this one, it stays the same... But for example the sandbag (on this site) model would use 0.
    It doesn't use the angle of the worker, just makes conjoined, or adjacent walls "cling"....

    Not a bad idea just not at all what I'm doing :)



    I can make it so walls that have already "clinged" wont again, unless they have un-clinged, but it would take some time and this system is real nice for thicker walls (like the sandbags), with skinny models like here (the fence) it isn't as good, but over-all it definitelly gets the job done and haven't seen resources of the like here.
     
  9. MortAr

    MortAr

    Joined:
    Feb 25, 2009
    Messages:
    1,765
    Resources:
    7
    Icons:
    6
    Packs:
    1
    Resources:
    7
  10. ThisPOT

    ThisPOT

    Joined:
    Feb 23, 2009
    Messages:
    570
    Resources:
    3
    Spells:
    3
    Resources:
    3
    How to have people listen to you (MortArs' sexy pic?) ;o...

    Thx btw!
     
  11. Pharaoh_

    Pharaoh_

    Joined:
    Nov 6, 2008
    Messages:
    8,128
    Resources:
    11
    Icons:
    3
    Skins:
    1
    Spells:
    6
    Tutorials:
    1
    Resources:
    11
    • Set Group_A = (Units within 150.00 of Point_A matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Wall_Real)))


    Leaks. Make sure you DestroyGroup.
     
  12. ThisPOT

    ThisPOT

    Joined:
    Feb 23, 2009
    Messages:
    570
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Hmmm I guess we all missed that, will fix right now.

    EDIT: updated, thanks :)!

    New limitation available to set only to horizontal and vertical to prevent players making ugly wall setups (if they are not perfectly placed horizontally or vertically to the other wall they will just remain horizontal).

    Old system revised and fixed.
     
    Last edited by a moderator: Aug 7, 2012
  13. war-lord

    war-lord

    Joined:
    Oct 29, 2010
    Messages:
    170
    Resources:
    0
    Resources:
    0
    tyyyyy i love this
     
  14. war-lord

    war-lord

    Joined:
    Oct 29, 2010
    Messages:
    170
    Resources:
    0
    Resources:
    0
    lol...
     
  15. TheFrenchLeprechaun

    TheFrenchLeprechaun

    Joined:
    Jun 22, 2012
    Messages:
    464
    Resources:
    0
    Resources:
    0
    Useful but not very handy... 4/5
     
  16. ThisPOT

    ThisPOT

    Joined:
    Feb 23, 2009
    Messages:
    570
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Aren't useful and handy the same thing ;o?
     
  17. TheFrenchLeprechaun

    TheFrenchLeprechaun

    Joined:
    Jun 22, 2012
    Messages:
    464
    Resources:
    0
    Resources:
    0
    I don't think so ^^
    However, I'm French, that could explain the possible mistake...