• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[GUI]-[MUI](Build Wall System) 1.02

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
This is my first system upload here. This system allows you to just by one click create a walls in a line from first wall to last target point. After it goes from a target point before to this new target point etc... It is GUI and MUI i hope it is bugless and leakless.
  • WBS Hashtable
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Creating Hashtable, don't touch anything ;( --------
      • Hashtable - Create a hashtable
      • Set WBS_Hashtable = (Last created hashtable)
      • -------- Creating Hashtable, don't touch anything ;( --------
  • WBS Start
    • Events
      • Unit - A unit Is issued an order with no target
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Issued order) Equal to (Order(custom_h000))
    • Actions
      • -------- Forcing player, to cast a spell (to activate a system) --------
      • Game - Force (Owner of (Ordered unit)) to press the key C
      • -------- Setting target point --------
      • Set WBS_Loc[0] = (Target point of issued order)
      • -------- Saving them in a hashtable --------
      • Hashtable - Save Handle OfWBS_Loc[0] as (Key build1) of (Key (Ordered unit)) in WBS_Hashtable
      • -------- Removing a one annoying bug with this actions --------
      • Set WBS_FirstTime = True
      • Hashtable - Save WBS_FirstTime as (Key firsttime) of (Key (Ordered unit)) in WBS_Hashtable
  • WBS Clicking
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Build Wall (Clicking)
    • Actions
      • -------- Setting actions and saving them in a hashtables --------
      • Set WBS_Loc[1] = (Target point of ability being cast)
      • Hashtable - Save Handle OfWBS_Loc[1] as (Key build2) of (Key (Triggering unit)) in WBS_Hashtable
      • Set WBS_Loc[2] = (Load (Key build1) of (Key (Triggering unit)) in WBS_Hashtable)
      • -------- Setting angle for future actions --------
      • Set WBS_Angle = (Angle from WBS_Loc[2] to WBS_Loc[1])
      • -------- Creating a dummy that will build a wall at a targeted point --------
      • Unit - Create 1 Dummy (wall build) for (Owner of (Triggering unit)) at WBS_Loc[2] facing Default building facing degrees
      • Unit - Order (Last created unit) to build a Wall at WBS_Loc[2]
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • For each (Integer WBS_Integer) from 1 to ((Integer((Distance between WBS_Loc[2] and WBS_Loc[1]))) / 50), do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Load (Key firsttime) of (Key (Triggering unit)) from WBS_Hashtable) Equal to True
            • Then - Actions
              • -------- Setting actions and saving them in a hashtables --------
              • Set WBS_FirstTime = False
              • Hashtable - Save WBS_FirstTime as (Key firsttime) of (Key (Ordered unit)) in WBS_Hashtable
              • Set WBS_Loc[3] = (WBS_Loc[2] offset by (50.00 x (Real(WBS_Integer))) towards WBS_Angle degrees)
              • -------- Creating a dummy that will build wall in a wanted line --------
              • Unit - Create 1 Dummy (wall build) for (Owner of (Triggering unit)) at WBS_Loc[3] facing Default building facing degrees
              • -------- Ordering dummy to build --------
              • Unit - Order (Last created unit) to build a Wall at WBS_Loc[3]
              • -------- Making dummy dissapier --------
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • -------- Removing Leaks --------
              • Custom script: call RemoveLocation(udg_WBS_Loc[3])
            • Else - Actions
              • -------- Setting actions and saving them in a hashtables --------
              • Set WBS_Loc[3] = (WBS_Loc[2] offset by (50.00 x (Real(WBS_Integer))) towards WBS_Angle degrees)
              • Set WBS_RemovingUnit = (Units within 10.00 of WBS_Loc[2] matching ((Unit-type of (Matching unit)) Equal to Dummy (wall build)))
              • -------- Now removing a unit, that we said that it is a "annoying" problem or a bug --------
              • Unit - Remove (Random unit from WBS_RemovingUnit) from the game
              • -------- Creating a dummy that will build wall in a wanted line --------
              • Unit - Create 1 Dummy (wall build) for (Owner of (Triggering unit)) at WBS_Loc[3] facing Default building facing degrees
              • -------- Ordering dummy to build --------
              • Unit - Order (Last created unit) to build a Wall at WBS_Loc[3]
              • -------- Making dummy dissapier --------
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • -------- Removing Leaks --------
              • Custom script: call RemoveLocation(udg_WBS_Loc[3])
              • Custom script: call RemoveLocation(udg_WBS_Loc[4])
      • -------- Setting actions and saving them in a hashtables --------
      • Hashtable - Save Handle OfWBS_Loc[1] as (Key build1) of (Key (Triggering unit)) in WBS_Hashtable
      • -------- Removing Leaks --------
      • Custom script: call RemoveLocation(udg_WBS_Loc[2])
In this map there is a an trigger "WBS Automatic" there is one optional thing.
If is there a leak, say me, or a ideas on how to remove them and how to improve system. Suggestions and comments are welcome. Enjoy ;)

Updated to 1.02
v 1.01 : uploaded
v 1.02 : destroyed some leaks and added an function for continuing building walls. (for chilla_killa ;D)
v 1.03 removed bug from dummy (attacking and walking)

Keywords:
Wall,build,system,build wall,system wall
Contents

Just another Warcraft III map (Map)

Reviews
12.12 IcemanBo: For long time as NeedsFix. Rejected. Bribe This appears to be leaking a fair amount of locations, but it's hard to tell based on your strange use of storing locations into a variable before storing them into a hashatble...

Moderator

M

Moderator

12.12
IcemanBo: For long time as NeedsFix. Rejected.

Bribe

This appears to be leaking a fair amount of locations, but it's hard to tell based on your strange use of storing locations into a variable before storing them into a hashatble.

(Ordered unit) -> (Triggering unit)
(Owner of (Ordered unit)) -> (Triggering player)

(Center of (Entire map)) leaks (Entire map). Just use (Center of (Playable map area))

((Region centered at -> leaks a region

(Owner of (Triggering unit)) -> (Triggering player)

Don't use arrays if you already know their indices. Instead of "Var[2]" use "Var2". This is faster and also less RAM-consuming and file-size heavy. GUI arrays add a bit of text to the "InitGlobals" function and just a few arrays amount to a good 50 lines of code. Avoid them when possible.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
It bugs quite a lot. I cliked to build the first piece, it told me "Unable to build there" and created about 200 pieces of wall towards south-east. And there were other cases where it bugged when "Unable to build there".

And I think you leak, you never remove "build1" and "build2" locations that you save in the hashtable.
 
Level 6
Joined
Dec 8, 2009
Messages
165
Looks interesting gonna check it...
Edit: Cool! Works, but u should make dummy for neutral passive and save owner of peasant to dummy with hashtable. And after dummy start building, replace with full hit pointed and change owner to saved player from hashtable. This will remove "I can´t build there" bug.
 
Last edited:
Level 13
Joined
Jun 9, 2009
Messages
1,129
I think that is just something to you.
Go to build menu. Choose the farm(wall). Just click on place where you want to start it, then click again on another point and walls would be created. (another point is a spell, so don't press right click or shift)
EDIT: The system is edited to version 1.02. added changelog. For more information, first post.
 
Last edited:
Level 13
Joined
Jun 9, 2009
Messages
1,129
lol I don't get it.
I just can build a single wall whereever I click.
Can you download last version, and save replay? then post it here so i can tell you what you're doing wrong. After it i will post you a replay how it needs to works cause that's maybe to you, or maybe something with system, that makes me feel sad (cause it doesn't works)
Edit: Here is the replay, this makes way easier View attachment How it works.w3g
 
Level 4
Joined
Mar 15, 2011
Messages
39
Not a wall system is necessary. warcraft 3, and has a system to build consecutively. you only have to use shif + click
 
Top