• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

X Hero siege switch heroes mode

Status
Not open for further replies.
Level 15
Joined
Oct 29, 2012
Messages
1,474
Hello
I'm facing a very bad problem with Dual hero mode .
I have a tavern picking system but I don't know storing variables and when hero 1 is selceted the other hero goes to recycle region . When hero 2 selected hero 1 goes to recycle region . And Of course Attributes and Exp and Level should be same always . Please help , they both go to recycle region . Can some one post this system?
EDIT : There are my triggers . They don't work really good since when picking first hero , it goes to recycle , so is 2nd hero :(
NOTE : I ALREADY HAVE LEAKS AND I KNOW THEM . BUT THEY AIN'T THE PROBLEM
  • Moving Players
    • Events
      • Unit - A unit enters Tavern <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Owner of (Entering unit)) Equal to Player 2 (Blue)
              • (Owner of (Entering unit)) Equal to Player 3 (Teal)
              • (Owner of (Entering unit)) Equal to Player 4 (Purple)
        • Then - Actions
          • Set Character_Hero[(Player number of (Owner of (Entering unit)))] = (Entering unit)
          • Unit - Move (Entering unit) instantly to (Center of Konoha Base <gen>)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Owner of (Entering unit)) Equal to Player 6 (Orange)
                  • (Owner of (Entering unit)) Equal to Player 7 (Green)
                  • (Owner of (Entering unit)) Equal to Player 8 (Pink)
            • Then - Actions
              • Set Character_Hero[(Player number of (Owner of (Entering unit)))] = (Entering unit)
              • Unit - Move (Entering unit) instantly to (Center of Akatsukis Base <gen>)
            • Else - Actions
      • Set INTEGER = (Player number of (Owner of (Entering unit)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (All Map <gen> contains OwnedUnit[INTEGER]) Equal to True
        • Then - Actions
          • Set OwnedUnit2[INTEGER] = (Entering unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SwitchMode Equal to True
            • Then - Actions
              • Set TempPoint100 = (Center of DualHero2[INTEGER])
              • Unit - Move (Triggering unit) instantly to TempPoint100
              • Custom script: call RemoveLocation(udg_TempPoint100)
            • Else - Actions
        • Else - Actions
          • Set OwnedUnit[INTEGER] = (Entering unit)
      • Hero - Create Duel Challenge [U] and give it to (Entering unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • INTEGER Equal to 2
              • INTEGER Equal to 3
              • INTEGER Equal to 4
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • OwnedUnit[INTEGER] Equal to (Triggering unit)
            • Then - Actions
              • Unit Group - Add (Triggering unit) to ALLIESGROUP
            • Else - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • OwnedUnit[INTEGER] Equal to (Triggering unit)
            • Then - Actions
              • Unit Group - Add (Triggering unit) to AXISGROUP
            • Else - Actions
  • Make Switch Heroes
    • Events
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
      • Player - Player 6 (Orange) Selects a unit
      • Player - Player 7 (Green) Selects a unit
      • Player - Player 8 (Pink) Selects a unit
    • Conditions
      • SwitchMode Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Equal to OwnedUnit[(Player number of (Triggering player))]
        • Then - Actions
          • Set SwitchmodePoint = (Position of (Triggering unit))
          • Set SwitchModePoint3 = (Center of DualHero2[(Player number of (Triggering player))])
          • Unit - Pause (Triggering unit)
          • For each (Integer SM_TempInteger) from 1 to 6, do (Actions)
            • Loop - Actions
              • Hero - Drop the item from slot SM_TempInteger of (Triggering unit)
              • Unit - Move (Triggering unit) instantly to SwitchModePoint3
              • Set SwitchMode_agi = (Agility of (Triggering unit) (Exclude bonuses))
              • Set SwitchMode_int = (Intelligence of (Triggering unit) (Exclude bonuses))
              • Set SwitchMode_str = (Strength of (Triggering unit) (Exclude bonuses))
              • Set SwitchMode_lvl = (Hero level of (Triggering unit))
              • Set SwitchMode_exp = (Hero experience of (Triggering unit))
              • Unit - Move OwnedUnit2[(Player number of (Triggering player))] instantly to SwitchmodePoint, facing (Facing of (Triggering unit)) degrees
              • Unit - Unpause OwnedUnit2[(Player number of (Triggering player))]
              • Hero - Give (Last created item) to OwnedUnit2[(Player number of (Triggering player))]
              • Hero - Set OwnedUnit2[(Player number of (Triggering player))] Hero-level to SwitchMode_lvl, Hide level-up graphics
              • Hero - Modify Strength of OwnedUnit2[(Player number of (Triggering player))]: Set to SwitchMode_str
              • Hero - Modify Agility of OwnedUnit2[(Player number of (Triggering player))]: Set to SwitchMode_agi
              • Hero - Modify Intelligence of OwnedUnit2[(Player number of (Triggering player))]: Set to SwitchMode_int
              • Hero - Set OwnedUnit2[(Player number of (Triggering player))] experience to SwitchMode_exp, Hide level-up graphics
              • Selection - Select OwnedUnit2[(Player number of (Triggering player))] for (Triggering player)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Triggering unit) Equal to OwnedUnit2[(Player number of (Triggering player))]
            • Then - Actions
              • Set SwitchmodePoint = (Position of (Triggering unit))
              • Set SwitchModePoint3 = (Center of DualHero1[(Player number of (Triggering player))])
              • Unit - Pause (Triggering unit)
              • For each (Integer SM_TempInteger) from 1 to 6, do (Actions)
                • Loop - Actions
                  • Hero - Drop the item from slot SM_TempInteger of (Triggering unit)
                  • Unit - Move (Triggering unit) instantly to SwitchModePoint3
                  • Set SwitchMode_agi = (Agility of (Triggering unit) (Exclude bonuses))
                  • Set SwitchMode_int = (Intelligence of (Triggering unit) (Exclude bonuses))
                  • Set SwitchMode_str = (Strength of (Triggering unit) (Exclude bonuses))
                  • Set SwitchMode_lvl = (Hero level of (Triggering unit))
                  • Set SwitchMode_exp = (Hero experience of (Triggering unit))
                  • Unit - Move OwnedUnit[(Player number of (Triggering player))] instantly to SwitchmodePoint, facing (Facing of (Triggering unit)) degrees
                  • Unit - Unpause O_o[(Player number of (Triggering player))]
                  • Hero - Give (Last created item) to OwnedUnit[(Player number of (Triggering player))]
                  • Hero - Set OwnedUnit[(Player number of (Triggering player))] Hero-level to SwitchMode_lvl, Hide level-up graphics
                  • Hero - Modify Strength of OwnedUnit[(Player number of (Triggering player))]: Set to SwitchMode_str
                  • Hero - Modify Agility of OwnedUnit[(Player number of (Triggering player))]: Set to SwitchMode_agi
                  • Hero - Modify Intelligence of OwnedUnit[(Player number of (Triggering player))]: Set to SwitchMode_int
                  • Hero - Set OwnedUnit[(Player number of (Triggering player))] experience to SwitchMode_exp, Hide level-up graphics
                  • Selection - Select OwnedUnit[(Player number of (Triggering player))] for (Triggering player)
            • Else - Actions
 
Last edited:

Rheiko

Spell Reviewer
Level 25
Joined
Aug 27, 2013
Messages
4,121
  • (Owner of (Entering unit)) Equal to Player 2 (Blue), use owner of triggering unit instead
  • Set Character_Hero[(Player number of (Owner of (Entering unit)))] = (Entering unit), use triggering unit not entering unit
  • Unit - Move (Entering unit) instantly to (Center of Konoha Base <gen>), use triggering unit and store the region into a variable then destroy it when you are done using it
  • (Owner of (Entering unit)) Equal to Player 6 (Orange)
    (Owner of (Entering unit)) Equal to Player 7 (Green)
    (Owner of (Entering unit)) Equal to Player 8 (Pink), use triggering unit
  • move your Set INTEGER = (Player number of (Owner of (Entering unit))) to the first action
  • move your Set Character_Hero[(Player number of (Owner of (Triggering unit)))] = (Triggering unit) to the second
  • (All Map <gen> contains OwnedUnit[INTEGER]) Equal to True, when did you stored the OwnedUnit variable?
  • Set OwnedUnit2[INTEGER] = (Entering unit), like i said before: use triggering unit
  • SwitchMode Equal to True, when did you set it to true? at variable window?
  • why did you add the same triggering unit to both groups?

i guess the second trigger has no problem
 
Level 15
Joined
Oct 29, 2012
Messages
1,474
(Owner of (Entering unit)) Equal to Player 2 (Blue), use owner of triggering unit instead
Set Character_Hero[(Player number of (Owner of (Entering unit)))] = (Entering unit), use triggering unit not entering unit
Unit - Move (Entering unit) instantly to (Center of Konoha Base <gen>), use triggering unit and store the region into a variable then destroy it when you are done using it
(Owner of (Entering unit)) Equal to Player 6 (Orange)
(Owner of (Entering unit)) Equal to Player 7 (Green)
(Owner of (Entering unit)) Equal to Player 8 (Pink), use triggering unit
Ok I will use Triggering Unit
move your Set INTEGER = (Player number of (Owner of (Entering unit))) to the first action
Ok I will do that
move your Set Character_Hero[(Player number of (Owner of (Triggering unit)))] = (Triggering unit) to the second
What do you mean?
(All Map <gen> contains OwnedUnit[INTEGER]) Equal to True, when did you stored the OwnedUnit variable?
it's already being stored in the else actions , should I use 'is alive' conditions instead?
SwitchMode Equal to True, when did you set it to true? at variable window?
when selecting modes
why did you add the same triggering unit to both groups?
You can see if owner of triggering unit is player 2 or 3 or 4 . it is added to first force , else added to second force .
 

Rheiko

Spell Reviewer
Level 25
Joined
Aug 27, 2013
Messages
4,121
move your Set Character_Hero[(Player number of (Owner of (Triggering unit)))] = (Triggering unit) to the second
What do you mean?
i mean, put this trigger next to Set INTEGER = (Player number of (Owner of (Entering unit)))

it's already being stored in the else actions , should I use 'is alive' conditions instead?
i don't think so

okay, just replace entering unit to triggering unit and do the others as i said
 
Status
Not open for further replies.
Top