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

[General] How to setup a spawn location

Status
Not open for further replies.
Level 4
Joined
Dec 16, 2013
Messages
84
sorry about my english

so i am making on hero arena map right now
but got confused about the spawn location

here is my case

My map is setting on 2 team
Team A: Player 1-5
Team B: Player 6-10

I have 1 tavern
and 2 base, Like sentinel and scourge base in dota
how do i make Team A to spawn at Base A when the player(1-5) picked a hero from that tavern?
and how do i make team B to spawn at Base B when the player(6-10)picked a hero from that tavern?

i actually did it on Team A, mean player in team A spawn at Base A
but i can't figure out on Team B

here is my current trigger
9kR5SwE.jpg


thanks btw

  • AMSettings
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 2) Equal to (Random integer number between 1 and 2)
            • Then - Actions
              • Unit - Create 1 Archmage for (Player((Integer A))) at (Center of (Playable map area)) facing Default building facing degrees
              • Set AM_CHOSEN_HERO[(Integer A)] = (Last created unit)
            • Else - Actions
              • Unit - Create 1 Blood Mage for (Player((Integer A))) at (Center of (Playable map area)) facing Default building facing degrees
              • Set AM_CHOSEN_HERO[(Integer A)] = (Last created unit)
      • Set AM_SHOW_OPPONENT_VALUE = False
      • Set AM_VALUE_NAME = Gold
      • Set AM_DOMINATION_TEXT = % Domination:
      • Set AM_HERO_TYPE[1] = Archmage
      • Set AM_HERO_TYPE[2] = Blood Mage
      • Set AM_HERO_ICON_PATH[1] = ReplaceableTextures\CommandButtons\BTNHeroArchMage.blp
      • Set AM_HERO_ICON_PATH[2] = ReplaceableTextures\CommandButtons\BTNHeroBloodElfPrince.blp
      • Set AM_HERO_TYPE_COUNT = 2
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Set (Picked player) Current gold to 750
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set AM_PLAYER_VALUE[(Integer A)] = ((Player((Integer A))) Current gold)
      • Set AM_NAME = Multiboard
      • Set AM_TEAM_ONE_NAME = Team 1
      • Set AM_TEAM_TWO_NAME = Team 2
      • Set AM_VALUE_ICON = UI\Feedback\Resources\ResourceGold.blp
      • Set AM_PG[1] = (All allies of Player 1 (Red))
      • Set AM_PG[2] = (All allies of Player 6 (Orange))
      • Set AM_PG_ALL = (All players)
      • Set AM_BAR_COLOUR[1] = |cffff0303
      • Set AM_BAR_COLOUR[2] = |cff999999
      • Set AM_BAR_COUNT = 10
      • For each (Integer A) from 1 to AM_BAR_COUNT, do (Actions)
        • Loop - Actions
          • Set AM_BAR_STRING = (AM_BAR_STRING + l)
      • -------- // // //// // //// // //// // //// // // --------
      • -------- // // //// // //// // //// // //// // // --------
      • -------- // // //// // //// // //// // //// // // --------
      • -------- // // //// // //// // //// // //// // // --------
      • -------- PLEASE SEE THIS: --------
      • -------- // PUT THE FOLLOWING ACTIONS INTO YOUR HERO CHOOSE TRIGGER --------
      • -------- // AND ENABLE THE CURRENTLY DISABLED ACTION AFTER PLACING IT IN THE TRIGGER --------
      • -------- // GO TO AMCreation and DELETE THE ACTION //PART 1// HERO ICON. --------
      • Player Group - Pick every player in AM_PG_ALL and do (Actions)
        • Loop - Actions
          • For each (Integer A) from 1 to AM_HERO_TYPE_COUNT, do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of AM_CHOSEN_HERO[(Player number of (Picked player))]) Equal to AM_HERO_TYPE[(Integer A)]
                • Then - Actions
                  • Set AM_PLAYER_HERO_ICON_PATH[(Player number of (Picked player))] = (Integer A)
                • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering player) is an ally of Player 1 (Red)) Equal to True
        • Then - Actions
          • Player Group - Pick every player in AM_PG[1] and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • AM_CHOSEN_HERO[(Player number of (Picked player))] Not equal to No unit
                • Then - Actions
                  • Multiboard - Set the display style for AM_MB[(Integer A)] item in column 1, row ((Position of (Picked player) in AM_LB[1]) + 2) to Show text and Show icons
                  • Multiboard - Set the icon for AM_MB[(Integer A)] item in column 1, row ((Position of (Picked player) in AM_LB[1]) + 2) to AM_HERO_ICON_PATH[AM_PLAYER_HERO_ICON_PATH[(Player number of (Picked player))]]
                • Else - Actions
        • Else - Actions
          • Player Group - Pick every player in AM_PG[2] and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • AM_CHOSEN_HERO[(Player number of (Picked player))] Not equal to No unit
                • Then - Actions
                  • Multiboard - Set the display style for AM_MB[(Integer A)] item in column 1, row ((Position of (Picked player) in AM_LB[2]) + ((Number of players in AM_PG[1]) + 4)) to Show text and Show icons
                  • Multiboard - Set the icon for AM_MB[(Integer A)] item in column 1, row ((Position of (Picked player) in AM_LB[2]) + ((Number of players in AM_PG[1]) + 4)) to AM_HERO_ICON_PATH[AM_PLAYER_HERO_ICON_PATH[(Player number of (Picked player))]]
                • Else - Actions
      • -------- // // //// // //// // //// // //// // // --------
      • -------- // // //// // //// // //// // //// // // --------
      • -------- // // //// // //// // //// // //// // // --------
      • -------- // // //// // //// // //// // //// // // --------
      • -------- CREATION OF LEADERBOARD --------
      • Leaderboard - Create a leaderboard for AM_PG[1] titled T1 LEADERBOARD
      • Leaderboard - Hide (Last created leaderboard)
      • Set AM_LB[1] = (Last created leaderboard)
      • Leaderboard - Create a leaderboard for AM_PG[2] titled T2 LEADERBOARD
      • Leaderboard - Hide (Last created leaderboard)
      • Set AM_LB[2] = (Last created leaderboard)
      • Player Group - Pick every player in AM_PG[1] and do (Actions)
        • Loop - Actions
          • Leaderboard - Add (Picked player) to AM_LB[1] with label (Name of (Picked player)) and value 0
      • Player Group - Pick every player in AM_PG[2] and do (Actions)
        • Loop - Actions
          • Leaderboard - Add (Picked player) to AM_LB[2] with label (Name of (Picked player)) and value 0
      • -------- REDUCE MEMORY USAGE... --------
      • Custom script: call DestroyTrigger(gg_trg_AMSettings)
 
Last edited:
Level 24
Joined
Jul 9, 2009
Messages
4,097
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Your Player is in Player Group - Player 6 (Orange)) Equal to True
        • Then - Actions
          • Player Group - Pick every player in (All players) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Your Unit) from the game
              • Camera - Pan camera for Your player to (Center of (Your region)) over 0.00 seconds
              • Unit - Move (Your unit) instantly to (Center of (Your region))
              • Player - Make Your unit Unavailable for training/construction by (Picked player)
              • Special Effect - Create a special effect at (Position of (Sold unit)) using Your Special Effect
        • Else - Actions
 
Level 4
Joined
Dec 16, 2013
Messages
84
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Your Player is in Player Group - Player 6 (Orange)) Equal to True
        • Then - Actions
          • Player Group - Pick every player in (All players) and do (Actions)
            • Loop - Actions
              • Unit - Remove (Your Unit) from the game
              • Camera - Pan camera for Your player to (Center of (Your region)) over 0.00 seconds
              • Unit - Move (Your unit) instantly to (Center of (Your region))
              • Player - Make Your unit Unavailable for training/construction by (Picked player)
              • Special Effect - Create a special effect at (Position of (Sold unit)) using Your Special Effect
        • Else - Actions

yo bro
but how to add specific player in group
because that trigger isnot working, however when i moved that trigger on "then-action" to "else action" it does work

conclusion is that my player is not in group yet, because it marked as FALSE
that's why it does work on 'then-action"

hope you understand, thank you
 
Level 24
Joined
Jul 9, 2009
Messages
4,097
It doesn't work on team B
but always work on team A
any solution thanks

UrWTv3X.jpg

The only difference is the condition and that specific line of code seems to work so you could try with greater than 5 instead of greater or equal to 6 other than that I can't think of anything, sorry.
 
Level 4
Joined
Dec 16, 2013
Messages
84
Dont use 'Picked Player' as reference. Use Owner of buying unit instead.

Edit:
Also use "[TRlGGER]Your code here [/TRIGGER]" for posting triggers instead of screenshots.

nevermind, i solved this and make its work
thanks anyway
 
Status
Not open for further replies.
Top