• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Perfect Walls V:4.0

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
02:20, 22nd Jul 2012 Magtheridon96: Approved. Despite the code size, this is a pretty cool resource.

Moderator

M

Moderator

02:20, 22nd Jul 2012
Magtheridon96: Approved.
Despite the code size, this is a pretty cool resource.
 
Level 11
Joined
Feb 23, 2009
Messages
577
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:
Here is the one trigger lols:

161gegg.png



If you downloaded Version 1 walls that are damaged while construction will always have full HP once constructed, to avoid that uglyness download V 2...

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.
 
Level 16
Joined
May 1, 2008
Messages
1,605
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
 
Level 11
Joined
Feb 23, 2009
Messages
577
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.

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.

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"....

What about adding abilities to a wall to rotate it?

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.
 
Level 11
Joined
Feb 23, 2009
Messages
577
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:
Top