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

Replacing starting units in region (READ)

Status
Not open for further replies.
Level 1
Joined
Aug 2, 2012
Messages
4
i want to replace starting human/orc/undead/night elf units with a nagas main hall and 5 nagas workers.. its only for 1 spot in 1 region near gold mine for player that will choose naga which is instead of random he will get naga units instead of ordinary units.. help please ty i can explain better if u want to help but dont understand quite right
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
Give this a shot, it worked when I tested it:

  • Trigger
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in region <gen>) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Unit-type of (Picked unit)) Equal to Town Hall
                  • (Unit-type of (Picked unit)) Equal to Great Hall
                  • (Unit-type of (Picked unit)) Equal to Necropolis
                  • (Unit-type of (Picked unit)) Equal to Tree of Life
            • Then - Actions
              • Unit - Replace (Picked unit) with a Altar of the Depths using The old unit's relative life and mana
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Unit-type of (Picked unit)) Equal to Peasant
                      • (Unit-type of (Picked unit)) Equal to Peon
                      • (Unit-type of (Picked unit)) Equal to Acolyte
                      • (Unit-type of (Picked unit)) Equal to Wisp
                • Then - Actions
                  • Unit - Replace (Picked unit) with a Mur'gul Slave using The old unit's relative life and mana
                • Else - Actions
You would need to configure Altar of the Depths properly, otherwise the game thinks you don't own a Town Hall and it says you will be revealed to your enemies :O

I uploaded a demo map if you want to test it :grin:
 

Attachments

  • replace.w3x
    16.4 KB · Views: 55
Status
Not open for further replies.
Top