• 🏆 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!

How to make an escape builder type of maze

Level 6
Joined
Jan 26, 2009
Messages
98

How to make an escape builder type of maze.


I've noticed there are no tutorials that tell you how to make a maze efficiently enough for its method to be used in escape builder maps.

1. The foundation of an Escape Builder


-What is a maze?

A maze is barely passable collection of paths which if you don' follow them you die, with patrolling monsters that touch you to kill and mortar teams firing at a periodic time and so on, you get the idea.

-How do I make one?

There are loads of ways to make a maze but all mazes have one thing. One type of path that kills and one that you can walk on. The following trigger will tell you what a really basic maze have and how to make them.

killing path trigger
  • Walk off path
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Set -YourUnitGroup- = (Units of type -your escaper here-) and do (Actions)
      • Unit Group - Pick every unit in -YourUnitGroup- (Actions)
        • Loop - Actions
          • Set -YourLocation- = (Position of (Picked unit)))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Conditions
                • (Terrain type at -YourLocation- here-) Equal to (-your killer ground here-)
            • Then - Actions
              • Unit - Kill (Picked Unit)
            • Else - Actions
      • Custom script: call DestroyGroup(udg_-YourUnitGroup-)
      • Custom script: call RemoveLocation(udg_-YourLocation-)

-a basic lives trigger.

See the following.

Step 1: Make an array called PlayerLB and another array called Lives, both with 12 indexes.

Step 2:Now lets setup a leaderboard containing the value of RedLives.
  • Lives Leaderboard
    • Events:
      • Time - Elapsed game time is 0.30 seconds
    • Conditions:
    • Actions:
      • Leaderboard - Create a leaderboard for (All players) titled Player Lives
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set PlayerLB(Integer A) = Player(Integer A)
          • Leaderboard - Add Player(Integer A) to (Last created leaderboard) with label Lives and value Lives(Integer A)
      • Leaderboard - Show (Last created leaderboard)
Step 3: Now that you have created a leaderboard you probably want to see the lives value change. Well then make this trigger!
  • Trigger4:Lives Lost Red
    • Events:
      • Unit - A unit dies
    • Conditions:
      • (Owner of (Dying unit)) Not equal to Player 12 (Brown)
    • Actions:
    • For each (Integer A) from 1 to 12, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Owner of (Dying unit)) Equal to Player(Integer A)
          • Then - Actions
            • Set Lives[(Integer A)] = (Lives[(Integer A)] - 1)
          • Else - Actions
      • Unit - Remove (Dying unit) from the game
      • Leaderboard - Change the value for Player 1 (Red) in (Last created leaderboard) to RedLives
      • Trigger - Run Defeat (checking conditions)
The Defeat Trigger....
  • Defeat
    • Events:
    • Conditions:
    • Actions:
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Lives[1] less than or equal to 0
            • Then - Actions
              • Game - Defeat Player (Integer A) with the message: -Any message here-
            • Else - Actions

-Respawn trigger


  • Rez
    • Events
      • Unit - A unit comes within 256.00 of -escaper-
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Respawnpoint
    • Actions
      • Set Respawnplace = (Position of (Triggering unit))
and
  • Rez2
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Dying unit)) Not equal to Player 12 (Brown)
    • Actions
      • Hero - Instantly revive (Dying unit) at Respawnplace, Show revival graphics
Well, that's a basic maze. The very basic, but you cannot find mazes like that.

-------------------------------------------------------------------------

2. The uniqueness of the maze


-The example trigger.

It is the very backbone of the map, you can keep adding to it.

  • Example trigger
    • Events
      • Unit - A unit comes within (45) of (-escaper-)
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) equal to (-whatever unit or building-)
        • Then - Actions
          • Set MyUnitGroup = (Units within 45.00 of (Position of (Triggering unit)))
          • Unit Group - Pick every unit in MyUnitGroup and do (Actions)
            • Loop - Actions
              • Set Unitgroup1 = (Last created unit group)
              • Unit Group - Remove (Triggering unit) from (Last created unit group)
              • Fill in what you want it to do. Teleport, kill or become a rez place?
        • Else - Actions
          • The if conditions thing again if you need more.
      • Custom script: call DestroyGroup(udg_MyUnitGroup)
-Killer monsters. Use the following...
  • Patrol1
    • Events
      • Unit - A unit enters (-your region-)
    • Conditions
      • ((UNIT-TYPE) of (TRIGGERING UNIT)) equal to (-CREEP UNIT-)
    • Actions
      • Unit - Order (TRIGGERING UNIT) to MOVE TO (CENTER OF (-your region2-))
and
  • Patrol2
    • Events
    • Unit - A unit enters (-your region2-)
    • Conditions
      • ((UNIT-TYPE) of (TRIGGERING UNIT)) equal to (-CREEP UNIT-)
    • Actions
      • Unit - Order (TRIGGERING UNIT) to MOVE TO (CENTER OF (-your region-))
add the following to the example trigger
  • Killer
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Unit type of (Triggering unit) equal (-CREEP UNIT-)
        • Then - Actions
          • Set MyUnitGroup = (Units within 45.00 of (Position of (Triggering unit)))
          • Unit Group - Pick every unit in MyUnitGroup (Actions)
            • Loop - Actions
              • Set Unitgroup1 = (Last created unit group)
              • Unit Group - Remove (Triggering unit) from (Last created unit group)
              • Unit - Kill (-escaper-)
        • Else - Actions
          • The if conditions thing again if you need more.
-shooters. Use the following...
  • Patrol1
    • Events
      • Unit - A unit enters (-your region3-)
    • Conditions
      • ((UNIT-TYPE) of (TRIGGERING UNIT)) equal to (-bomb target-)
    • Actions
      • Unit - Order (TRIGGERING UNIT) to MOVE TO (CENTER OF (-your region4-))
and
  • Patrol2
    • Events
      • Unit - A unit enters (-your region4-)
    • Conditions
      • ((UNIT-TYPE) of (TRIGGERING UNIT)) equal to (-bomb target-)
    • Actions
      • Unit - Order (TRIGGERING UNIT) to MOVE TO (CENTER OF (-your region3-))
and
  • Bomb
    • Events
      • Every 3.00 seconds of game time.
    • Conditions
    • Actions
      • Unit - Order (-CATAPULT CREEP-) to ATTACK (-bomb target-)
P.S. Make the catapult creep deal 999999999 damage to all armor except bomb target's armor.

-More Ideas:

Terrain Change:

Use a terrain changer that changes the tile next to it horizontally and changes the tile next next to it horizontally walkable tile and unwalkable tile respectively. Add these to the example trigger...
  • More stuff to add
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Unit-type of (Triggering unit)) equal to (-terrain changer-)
      • Then - Actions
        • Set MyUnitGroup = (Units within 45.00 of (Position of (Triggering unit))) and do (Actions)
        • Unit Group - Pick every unit in MyUnitGroup (Actions)
          • Loop - Actions
            • Unit Group - Remove (Triggering unit) from (Last created unit group)
              • Set MyLocation = offset by (any, any)) to -your killer ground here- using variation -1 in an area of size 1 and shape Circle
              • Set MyLocation1=((Position(Triggeringunit))MyLocation
              • Environment - Change terraintype at MyLocation1 Circle offset by (any, any)) to -your killer ground here- using variation -1 in an area of size 1 and shape Circle
              • Custom script: call RemoveLocation(udg_MyLocation1)
      • Else - Actions
        • The if conditions thing again if you need more.
Using Fade Filters for Confusion

You can make a fade filter with a transparent gap to see the player and make a trigger to fix the camera to the player to make it look like a DARK cave and harder to see, or you could grant no invisibility and instead give the heroes lesser radius so that they see less.

Moving Mazes

The walls are units and they patrol and you must still keep to the path without touching the units, it is useful for traps and such. Use the killer trigger for the units to kill.

Traps

Things like units come from no where and trap you, an item gets stuck, you must hit switches to get past stuff etc. it is very useful to make your maze more fun! Add the following to the example.

  • More stuff to add 2
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Unit-type of (Triggering unit)) equal to (-your trap-)
      • Then - Actions
        • Set MyLocation = (Position of (Triggering unit))) and do (Actions)
        • Set YourUnitGroup = (Units within 45.00 of (MyLocation))
    • Unit Group - Pick every unit in (YourUnitGroup) and do (Actions)
      • Loop - Actions
        • Unit Group - Remove (Triggering unit) from (YourUnitGroup)
        • The trap's function here
      • Else - Actions
        • The if conditions thing again if you need more.
    • Custom script: call RemoveLocation(udg_MyLocation)
    • Custom script: call DestroyGroup(udg_YourUnitGroup)
Boss Levels

if you have levels in your maze then this idea is a good choice, have a boss which moves about and you have to do something in the level which makes it lose health, when it dies a gate opens so that you can escape to the next part of the maze. Your imagination, your trigger.

Choose an escaper

  • Type-select a escaper
  • Events
    • Player - (Player((Min(1, 12)))) types a chat message containing - Fast Escaper as An exact match
  • Conditions
  • Actions
    • Set YourLocation = (Center of Startpoint <gen>)
    • Unit - Create 1 Fast escaper for (Triggering player) at (YourLocation <gen>) facing 90.00 degrees
    • Set Escaper[Player number of (Triggering player] = (Last created unit)
    • Custom script: call RemoveLocation(udg_YourLocation)
  • Custom script: call DestroyTrigger(GetTriggeringTrigger())
--------------------------------------------------------

3. The short guide to make it complete


Just make two teams, one called ''escaper'' and one called ''builder''. Make the buildings and the workers, the settings and the rest of what an escape builder have!

(My WE have problems, sorry, no test map)

P.S. You need to make all non-escaper units invulnerable or unable to take damage, but hittable.
P.P.S. I used Leak Check V3 to check for leaks. May be inaccurate.
 
Top