• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Making more slots for creating units

Status
Not open for further replies.
Level 2
Joined
May 18, 2019
Messages
20
Hi
so idk if this topic is here i couldn't find it, but how do i make more slots for unit pick
i have too many heroes and i need to put them all in, but buildings have only 12 slots which 1 is rally and 1 is cancel and i don't want ot make a new building
so is there a way to make something like arrow that will move you to more slot space in the building if so then how do i make it.
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,714
Check out the map I uploaded, it contains a Page system I created for training units.

To get started:
1) Copy and Paste the Building Page System Folder (Trigger Editor) and the Next Page Button and Previous Page Button Units (Object Editor) into your map. Make sure that "automatically create unknown variables" is enabled in your File/Preferences before doing this.

2) Edit the Variables in the "BPS Initial Setup" trigger between CONFIGURE and STOP HERE.

3) Edit the Variables in the "Add Barracks To System" trigger between CONFIGURE and STOP HERE. If you want to add a new structure to the system then simply copy and paste this trigger and configure it.

  • BPS Initial Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- CONFIGURE: --------
      • -------- - --------
      • Set bps_NextPage = Next Page Button
      • Set bps_PreviousPage = Previous Page Button
      • -------- - --------
      • -------- Set this to the total number of Structure TYPES that use this system. So if for example you were using each Race's Altar (Storms/Kings/etc) this should be set to 4 --------
      • Set bps_TotalStructures = 2
      • -------- - --------
      • -------- STOP HERE --------
      • -------- - --------
      • Set bps_StructureTypeLimit = (3 + bps_TotalStructures)
      • Hashtable - Create a hashtable
      • Set bps_Hashtable = (Last created hashtable)
  • Add Barracks To System
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- CONFIGURE: --------
      • -------- - --------
      • Set bps_Structure = Barracks
      • -------- - --------
      • Set bps_TotalUnitsTrained = 14
      • -------- - --------
      • Set bps_MaxUnitsPerPage = 8
      • -------- - --------
      • Set bps_UnitType[1] = Footman
      • Set bps_UnitType[2] = Knight
      • Set bps_UnitType[3] = Rifleman
      • Set bps_UnitType[4] = Mortar Team
      • Set bps_UnitType[5] = Flying Machine
      • Set bps_UnitType[6] = Gryphon Rider
      • Set bps_UnitType[7] = Priest
      • Set bps_UnitType[8] = Sorceress
      • Set bps_UnitType[9] = Siege Engine
      • Set bps_UnitType[10] = Spell Breaker
      • Set bps_UnitType[11] = Acolyte
      • Set bps_UnitType[12] = Ghoul
      • Set bps_UnitType[13] = Crypt Fiend
      • Set bps_UnitType[14] = Abomination
      • -------- - --------
      • -------- STOP HERE --------
      • -------- - --------
      • -------- Run System --------
      • Trigger - Run BPS Run <gen> (ignoring conditions)
Also, make sure your Structure has the Next Page Button and Previous Page Button UNITS added to it's Units Trained list in the Object Editor. And I THINK you need to place them at the very top of the list so they're the first two units trained.

Note: I use a Barracks as an example in my map but I'm sure it will work fine with Altars/Heroes.

Some minor flaws with the system. They shouldn't cause many problems:
1) You can't switch Pages while training 7 Units at a time. This is because the Next Page/Prev Page buttons are actually Units themselves, and the trigger requires that you "begin training" them, but if your queue is full then you can't do that.

2) Since I can only make the Units Available/Unavailable for training by PLAYER that means that switching pages will affect ALL other buildings owned by that player of the same type.

3) If you press Next Page while on the Last Page it will bring you back to the 1st Page. However, pressing Previous Page while on the 1st Page won't do anything.
 

Attachments

  • Building Page System v.3.w3x
    24.3 KB · Views: 43
Last edited:
Status
Not open for further replies.
Top