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

About Hero Pick

Status
Not open for further replies.
Level 5
Joined
Jul 30, 2012
Messages
93
Hi,

i have a problem about hero picks.It's okey as i play in test map.But on garena it doesn't work...

  • Hero Pick
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • ((Sold unit) is A Hero) Equal to True
    • Actions
      • Set triggering = (Sold unit)
      • Set pick = ((Owner of triggering) start location)
      • Unit - Move triggering instantly to pick
      • Selection - Select triggering for (Owner of triggering)
      • Camera - Pan camera for (Owner of triggering) to ((Owner of triggering) start location) over 0.00 seconds
      • Set Hero[(Player number of (Owner of triggering))] = triggering
      • Set rastgele_used[(Player number of (Owner of triggering))] = True
      • Set lastcreated = (Last created multiboard)
      • For each (Integer A) from 1 to HeroSayisi, do (Actions)
        • Loop - Actions
          • Player Group - Pick every player in (All players) and do (Actions)
            • Loop - Actions
              • Player - Make rastgelehero[(Integer A)] Unavailable for training/construction by (Owner of triggering)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • rastgelehero[(Integer A)] Equal to (Unit-type of (Sold unit))
            • Then - Actions
              • Multiboard - Set the display style for lastcreated item in column 1, row PlayerSatir[(Player number of (Owner of triggering))] to Show text and Show icons
              • Multiboard - Set the icon for lastcreated item in column 1, row PlayerSatir[(Player number of (Owner of triggering))] to Ikon[(Integer A)]
              • Player Group - Pick every player in (All players) and do (Actions)
                • Loop - Actions
                  • Player - Make rastgelehero[(Integer A)] Unavailable for training/construction by (Picked player)
              • Set rastgelehero[(Integer A)] = rastgelehero[HeroSayisi]
              • Set HeroSayisi = (HeroSayisi - 1)
            • Else - Actions
      • Custom script: call RemoveLocation(udg_pick)
Sometimes multiboard trigger doesn't writes true icon on scoreboard.The first hero pick is okey.Then second pick is sometimes okey sometimes not.Some of players' hero icon is same with other picked heroes. :S How can i fix?

Thank you!
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
If u store ur data into an array, then ur problem should be this
Set HeroSayisi = (HeroSayisi - 1)
Why? I'll give an example:
I'll set the Unit-type:
Hero[1]= Paladin
Hero[2]= Archmage
Hero[3]= Blademaster
Hero[4]= Far Seer
And my HeroSayisi=4
According to ur trigger, if I choose Blademaster, the HeroSayiri will become 3. Then if the other player choose Far Seer, the loop wont return anything for him since it only check from 1 to 3 while his hero is in the array [4].
 
Status
Not open for further replies.
Top