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

[Spell Request]

Status
Not open for further replies.
Level 13
Joined
Oct 25, 2009
Messages
995
Hmm,maker,why this won't work?
  • Init Shop
    • Events
      • Unit - A unit Finishes construction
    • Conditions
      • (Unit-type of (Constructed structure)) Equal to Command Center
    • Actions
      • Hashtable - Save 1 as (Key next) of (Key (Constructed structure)) in UnitHash
      • Neutral Building - Add Next to (Constructed structure) with 1 in stock and a max stock of 1
      • Neutral Building - Add Previous to (Constructed structure) with 1 in stock and a max stock of 1
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Neutral Building - Add Hero[(Integer A)] to (Constructed structure) with 1 in stock and a max stock of 1
EDIT: I changed to train unit,i built command center,but doesn't have the previous and next icon?
 
Level 13
Joined
Oct 25, 2009
Messages
995
Try this.
  • Rally Point
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to (YOUR UNIT)
    • Actions
      • Unit - Order (Last created unit) to Attack-Move To (Center of (YOUR REGION))

eh,problem not at set rally points,maker,you know Amigurumi Group System?
after i used this next menu and previous menu,these group system doesn't work anymore! :vw_wtf:
 
Level 13
Joined
Oct 25, 2009
Messages
995
BUMP!
Trigger of Group

  • Group Train units
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
    • Actions
      • Set GNumber = (GNumber + 1)
      • Set GLeader[GNumber] = (Trained unit)
      • Unit - Add Unknown (A000) to GLeader[GNumber]
      • Unit - Set the custom value of GLeader[GNumber] to GNumber
      • For each (Integer GInteger) from 1 to ((Point-value of (Trained unit)) - 1), do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Triggering player) Food used) Equal to ((Triggering player) Food max)
            • Then - Actions
              • Set GPlayerGroup = (Player group((Triggering player)))
              • Game - Display to GPlayerGroup the text: You have reached yo...
              • Custom script: call DestroyForce(udg_GPlayerGroup)
              • Skip remaining actions
            • Else - Actions
              • Set GPoint[1] = (Position of (Trained unit))
              • Set GPoint[2] = (Rally-Point of (Triggering unit) as a point)
              • Unit - Create 1 (Unit-type of (Trained unit)) for (Owner of (Triggering unit)) at GPoint[1] facing (Facing of (Trained unit)) degrees
              • AI - Ignore (Last created unit)'s guard position
              • Unit - Order (Last created unit) to Attack-Move To GPoint[2]
              • Unit - Set the custom value of (Last created unit) to GNumber
              • Custom script: call RemoveLocation(udg_GPoint[1])
              • Custom script: call RemoveLocation(udg_GPoint[2])

  • Set Unit
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Hero[1] = Soldiers AK-47 |cffff0000Rank 1|r
      • Set Hero[2] = Soldiers Famas |cffff0000Rank 1|r
      • Set Hero[3] = Soldiers M249 |cffff0000Rank 1|r
      • Set Hero[4] = Soldiers M4 |cffff0000Rank 1|r
      • Set Hero[5] = Soldiers SIG556 |cffff0000Rank 1|r
      • Set Hero[6] = Soldiers AK-47 |cffff0000Rank 2|r
      • Set Hero[7] = Soldiers Famas |cffff0000Rank 2|r
      • Set Hero[8] = Soldiers M249 |cffff0000Rank 2|r
      • Set Hero[9] = Soldiers M4 |cffff0000Rank 2|r
      • Set Hero[10] = Soldiers SIG556 |cffff0000Rank 2|r
      • Set Hero[11] = Soldiers AK-47 |cffff0000Rank 3|r
      • Set Hero[12] = Soldiers Famas |cffff0000Rank 3|r
      • Set Hero[13] = Soldiers M249 |cffff0000Rank 3|r
      • Set Hero[14] = Soldiers SIG556 |cffff0000Rank 3|r
      • Set Hero[15] = Soldiers M4 |cffff0000Rank 3|r
      • Hashtable - Create a hashtable
      • Set UnitHash = (Last created hashtable)
  • Init Shop
    • Events
      • Unit - A unit Finishes construction
    • Conditions
    • Actions
      • Hashtable - Save 1 as (Key Next) of (Key (Constructed structure)) in UnitHash
      • Neutral Building - Add Next to (Constructed structure) with 1 in stock and a max stock of 1
      • Neutral Building - Add Previous to (Constructed structure) with 1 in stock and a max stock of 1
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Neutral Building - Add Hero[(Integer A)] to (Constructed structure) with 1 in stock and a max stock of 1
  • Next
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Unit-type of (Sold unit)) Equal to Next
    • Actions
      • Unit - Remove (Sold unit) from the game
      • Set Next = ((Load (Key Next) of (Key (Selling unit)) from UnitHash) + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Next Equal to 2
        • Then - Actions
          • For each (Integer A) from 1 to 5, do (Actions)
            • Loop - Actions
              • Neutral Building - Remove Hero[(Integer A)] from (Selling unit)
          • Neutral Building - Add Next to (Selling unit) with 1 in stock and a max stock of 1
          • Neutral Building - Add Previous to (Selling unit) with 1 in stock and a max stock of 1
          • For each (Integer A) from 6 to 10, do (Actions)
            • Loop - Actions
              • Neutral Building - Add Hero[(Integer A)] to (Selling unit) with 1 in stock and a max stock of 1
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Next Equal to 3
            • Then - Actions
              • For each (Integer A) from 6 to 10, do (Actions)
                • Loop - Actions
                  • Neutral Building - Remove Hero[(Integer A)] from (Selling unit)
              • Neutral Building - Add Next to (Selling unit) with 1 in stock and a max stock of 1
              • Neutral Building - Add Previous to (Selling unit) with 1 in stock and a max stock of 1
              • For each (Integer A) from 11 to 15, do (Actions)
                • Loop - Actions
                  • Neutral Building - Add Hero[(Integer A)] to (Selling unit) with 1 in stock and a max stock of 1
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Next Equal to 4
                • Then - Actions
                  • Set Next = 1
                  • For each (Integer A) from 11 to 15, do (Actions)
                    • Loop - Actions
                      • Neutral Building - Remove Hero[(Integer A)] from (Selling unit)
                  • Neutral Building - Add Next to (Selling unit) with 1 in stock and a max stock of 1
                  • Neutral Building - Add Previous to (Selling unit) with 1 in stock and a max stock of 1
                  • For each (Integer A) from 1 to 5, do (Actions)
                    • Loop - Actions
                      • Neutral Building - Add Hero[(Integer A)] to (Selling unit) with 1 in stock and a max stock of 1
                • Else - Actions
      • Hashtable - Save Next as (Key next) of (Key (Selling unit)) in UnitHash
  • Previous
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Unit-type of (Sold unit)) Equal to Previous
    • Actions
      • Unit - Remove (Sold unit) from the game
      • Set Next = ((Load (Key next) of (Key (Selling unit)) from UnitHash) - 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Next Equal to 0
        • Then - Actions
          • Set Next = 3
          • For each (Integer A) from 1 to 5, do (Actions)
            • Loop - Actions
              • Neutral Building - Remove Hero[(Integer A)] from (Selling unit)
          • Neutral Building - Add Next to (Selling unit) with 1 in stock and a max stock of 1
          • Neutral Building - Add Previous to (Selling unit) with 1 in stock and a max stock of 1
          • For each (Integer A) from 11 to 15, do (Actions)
            • Loop - Actions
              • Neutral Building - Add Hero[(Integer A)] to (Selling unit) with 1 in stock and a max stock of 1
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Next Equal to 1
            • Then - Actions
              • For each (Integer A) from 6 to 10, do (Actions)
                • Loop - Actions
                  • Neutral Building - Remove Hero[(Integer A)] from (Selling unit)
              • Neutral Building - Add Next to (Selling unit) with 1 in stock and a max stock of 1
              • Neutral Building - Add Previous to (Selling unit) with 1 in stock and a max stock of 1
              • For each (Integer A) from 1 to 5, do (Actions)
                • Loop - Actions
                  • Neutral Building - Add Hero[(Integer A)] to (Selling unit) with 1 in stock and a max stock of 1
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Next Equal to 2
                • Then - Actions
                  • For each (Integer A) from 11 to 15, do (Actions)
                    • Loop - Actions
                      • Neutral Building - Remove Hero[(Integer A)] from (Selling unit)
                  • Neutral Building - Add Next to (Selling unit) with 1 in stock and a max stock of 1
                  • Neutral Building - Add Previous to (Selling unit) with 1 in stock and a max stock of 1
                  • For each (Integer A) from 6 to 10, do (Actions)
                    • Loop - Actions
                      • Neutral Building - Add Hero[(Integer A)] to (Selling unit) with 1 in stock and a max stock of 1
                • Else - Actions
      • Hashtable - Save Next as (Key next) of (Key (Selling unit)) in UnitHash
 
Status
Not open for further replies.
Top