[Log in / Register]
| News | Chat | Pastebin | Donations | Tutorials | Rules | Forums | Starcraft II |
| Maps | Skins | Icons | Models | Spells | Tools | Jass | Packs |
(Keeps Hive Alive)
Go Back   The Hive Workshop > Warcraft III Hosted Projects > Project Depository > Requiem of the Gods > Bug Reporting\Technical Issues

Bug Reporting\Technical Issues Found a bug? Got a problem? Report it here and get help.

Closed Thread
 
LinkBack (1) Thread Tools
Old 04-02-2008, 10:56 PM   #1 (permalink)
Registered User Steelb_l_ade
Creator of ROTG
 
Steelb_l_ade's Avatar
 
Join Date: Apr 2006
Posts: 185
Steelb_l_ade is on a distinguished road (75)Steelb_l_ade is on a distinguished road (75)
PayPal Donor: This user has donated at least $20 to The Hive. 
Bug Random, -Repick and multiple heroes?

Hey guys, I have a problem with the hero choosing system and was wondering if any of you knew whats up with it.

A brief explanation first. There are three ways of obtaining a hero,

firstly by randoming it by entering a region.

secondly by manually choosing it,

thirdly by -repicking a hero and getting a new one.

Each hero shoudl only be allowed to be chosen once.
When heroes are picked manually this is fine, and tehre is also arrays in place to prevent the same hero from being randomed twice.

However, the problem arises with -repick.
The unwanted hero has to be re-inserted into the array, while the new hero chosen must be removed.

(baiscally when u -repick your hero someone else must then be allowed to choose it thourgh any of the methods above and ure new hero ccant be the same as one someone already has)

what follows is the triggers for this system:

SETTING THE HERO VARS

MasterHeroSetup
Events
Conditions
Actions
-------- HERO SETUP --------
Set Hero[1] = Arch Druid|r (|c00FF0033Support Caster|r) 0065 <gen>
Set Hero[2] = Death Mage|r (|c00FF0033Support Caster|r) 0066 <gen>
Set Hero[3] = Demon|r (|c00FF0033Frontline Melee|r) 0074 <gen>
Set Hero[4] = Disruptor|r (|c00FF0033Support Melee|r) 0075 <gen>
Set Hero[5] = Berserker|r (|c00FF0033Frontline Melee|r) 0076 <gen>
Set Hero[6] = Elven Ranger|r (|c00FF0033Ranged|r) 0078 <gen>
Set Hero[7] = Burrower|r (|c00FF0033Frontline Melee|r) (Standard) 0080 <gen>
Set Hero[8] = Elementalist|r (|c00FF0033Caster|r) 0082 <gen>
Set Hero[9] = Shadow Ranger|r (|c00FF0033Ranged|r) 0013 <gen>
Set Hero[10] = SwordMaster|r (|c00FF0033Melee|r) 0089 <gen>
Set Hero[11] = Hill Giant|r (|c00FF0033Frontline Melee|r) 0087 <gen>
Set Hero[12] = Barbarian|r (|c00FF0033Melee|r) 0239 <gen>
Set Hero[13] = Vampire|r (|c00FF0033Support Melee|r) 0095 <gen>
Set Hero[14] = Voodoo Priest|r (|c00FF0033Support Caster|r) 0225 <gen>
Set Hero[15] = Shadowmancer|r (|c00FF0033Caster|r) 0159 <gen>
Set Hero[16] = Court Wizard|r (|c00FF0033Support Caster|r) 0099 <gen>
Set Hero[17] = Jungle Troll|r (|c00FF0033Ranged|r) 0122 <gen>
Set Hero[18] = Forest Guardian|r (|c00FF0033Caster|r) 0180 <gen>
Set Hero[19] = Arcane Summoner|r (|c00FF0033Caster|r) 0126 <gen>
Set Hero[20] = Viper Spider|r (|c00FF0033Melee|r) 0152 <gen>
Set Hero[21] = Lichmaster|r (|c00FF0033Caster|r) 0128 <gen>
Set Hero[22] = Pit Daemon|r (|c00FF0033Frontline Melee|r) (Standard) 0131 <gen>
Set Hero[23] = Diabloist|r (|c00FF0033Caster|r) 0132 <gen>
Set Hero[24] = Sea Drake|r (|c00FF0033Support Caster|r) 0133 <gen>
Set Hero[25] = Goblin Mechanic|r (|c00FF0033Melee|r) 0091 <gen>
Unit - Hide Goblin Mechanic|r (|c00FF0033Melee|r) 0091 <gen>
Set Random_Count = 25
For each (Integer A) from 1 to Random_Count, do (Actions)
Loop - Actions
Set HeroType[(Integer A)] = (Unit-type of Hero[(Integer A)])
For each (Integer B) from 1 to Random_Count, do (Actions)
Loop - Actions
Set Random_Data[(Integer B)] = (Integer B)
Set Random_TitanCount = 8
-------- ICON SETUP --------
Set HeroIcon[1] = ReplaceableTextures\CommandButtons\BTNFurion.blp
Set HeroIcon[2] = ReplaceableTextures\CommandButtons\BTNKelThuzad.blp
Set HeroIcon[3] = ReplaceableTextures\CommandButtons\BTNEvilIllidan.blp
Set HeroIcon[4] = ReplaceableTextures\CommandButtons\BTNRevenant.blp
Set HeroIcon[5] = ReplaceableTextures\CommandButtons\BTNHellScream.blp
Set HeroIcon[6] = ReplaceableTextures\CommandButtons\BTNSylvanusWindrunner.blp
Set HeroIcon[7] = ReplaceableTextures\CommandButtons\BTNHeroCryptLord.blp
Set HeroIcon[8] = ReplaceableTextures\CommandButtons\BTNArchimonde.blp
Set HeroIcon[9] = ReplaceableTextures\CommandButtons\BTNBansheeRanger.blp
Set HeroIcon[10] = ReplaceableTextures\CommandButtons\BTNHeroBloodElfPrince.blp
Set HeroIcon[11] = ReplaceableTextures\CommandButtons\BTNOneHeadedOgre.blp
Set HeroIcon[12] = ReplaceableTextures\CommandButtons\BTNBeastMaster.blp
Set HeroIcon[13] = ReplaceableTextures\CommandButtons\BTNTichondrius.blp
Set HeroIcon[14] = ReplaceableTextures\CommandButtons\BTNWitchDoctor.blp
Set HeroIcon[15] = ReplaceableTextures\CommandButtons\BTNSkeletonMage.blp
Set HeroIcon[16] = ReplaceableTextures\CommandButtons\BTNJaina.blp
Set HeroIcon[17] = ReplaceableTextures\CommandButtons\BTNForestTroll.blp
Set HeroIcon[18] = ReplaceableTextures\CommandButtons\BTNAncientOfTheEarth.blp
Set HeroIcon[19] = ReplaceableTextures\CommandButtons\BTNHeroArchMage.blp
Set HeroIcon[20] = ReplaceableTextures\CommandButtons\BTNSpider.blp
Set HeroIcon[21] = ReplaceableTextures\CommandButtons\BTNLichVersion2.blp
Set HeroIcon[22] = ReplaceableTextures\CommandButtons\BTNSludgeCreature.blp
Set HeroIcon[23] = ReplaceableTextures\CommandButtons\BTNKiljaedin.blp
Set HeroIcon[24] = ReplaceableTextures\CommandButtons\BTNSeaDrake.blp
Set HeroIcon[25] = ReplaceableTextures\CommandButtons\BTNGoblinSapper.blp

THE CHOOSE HERO BIT (ONE FOR EACH HERO)
Choose Hero 1
Events
Unit - A unit enters HeroChoose1 <gen>
Conditions
And - All (Conditions) are true
Conditions
Hero_Taken[1] Equal to False
(Unit-type of (Triggering unit)) Equal to Spirit (Hero Picker)
(Number of units in (Units in HeroChoose1 <gen> matching (((Owner of (Matching unit)) Not equal to (Owner of (Triggering unit))) and ((Unit-type of (Matching unit)) Equal to Spirit (Hero Picker))))) Equal to 0
Actions
Set HeroCinematicPlayerNumber = (Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))])
Set HeroCinematicHeroNumber = 1
Trigger - Run Hero Cinematics <gen> (checking conditions)
Set HeroInfoText = (Player group((Owner of (Triggering unit))))
Cinematic - Clear the screen of text messages for HeroInfoText
Game - Display to HeroInfoText for 120.00 seconds the text: Arch Druid (|c00FF0...
Game - Display to HeroInfoText for 120.00 seconds the text: |c000099FFDifficult...
Game - Display to HeroInfoText for 120.00 seconds the text: |c000099FFStrength|...
Game - Display to HeroInfoText for 120.00 seconds the text: |c000099FFHero Powe...
Game - Display to HeroInfoText for 120.00 seconds the text: |C0099CC99To select...
Custom script: call DestroyForce(udg_HeroInfoText)

THE MASTER HERO CINEMATIC BIT
Hero Cinematics
Events
Conditions
Actions
Player Group - Add PlayerArray[HeroCinematicPlayerNumber] to PlayersViewingCinPG
Set HeroINTEGER[HeroCinematicPlayerNumber] = HeroCinematicHeroNumber
Set ViewingHeroCin[HeroCinematicPlayerNumber] = True
Set HeroCinematicPoint = (Center of HeroChooseRegion[HeroCinematicHeroNumber])
Unit - Move SpiritPicker[HeroCinematicPlayerNumber] instantly to HeroCinematicPoint
Custom script: call RemoveLocation(udg_HeroCinematicPoint)
-------- Does not enable for refs --------
-------- ^^ refers to the orginal owner not the new one --------
Player - Enable Choose Hero (|c0000FF00X|r) (Hero Pickers) for (Owner of SpiritPicker[HeroCinematicPlayerNumber])
Animation - Change SpiritPicker[HeroCinematicPlayerNumber]'s vertex coloring to (50.00%, 50.00%, 50.00%) with 95.00% transparency
Animation - Change SpiritPicker[HeroCinematicPlayerNumber]'s size to (60.00%, 60.00%, 60.00%) of its original size
Unit - Set SpiritPicker[HeroCinematicPlayerNumber] movement speed to 0.00
Multiboard - Minimize ScoreMultiboard
Camera - Apply HeroCamera[HeroCinematicHeroNumber] for PlayerArray[HeroCinematicPlayerNumber] over 0.75 seconds
Wait 0.20 seconds
Sound - Play HeroCinSound[HeroCinematicHeroNumber] at 100.00% volume, attached to Hero[HeroCinematicHeroNumber]

MASTER HERO CHOOSING TRIGGER (MANUAL)
Choose Heroes MASTER
Events
Unit - A unit Begins casting an ability
Conditions
And - All (Conditions) are true
Conditions
(Ability being cast) Equal to Choose Hero (|c0000FF00X|r) (Hero Pickers)
Hero_Taken[HeroINTEGER[(Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))])]] Equal to False
Actions
Set ViewingHeroCin[(Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))])] = False
Camera - Reset camera for (Owner of (Triggering unit)) to standard game-view over 0.00 seconds
Set ChooseHeroText = (Player group((Owner of (Triggering unit))))
Cinematic - Clear the screen of text messages for ChooseHeroText
Custom script: call DestroyForce(udg_ChooseHeroText)
Set HeroChoosePointA = (Position of Hero[HeroINTEGER[(Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))])]])
Sound - Play HeroChosen <gen> at 100.00% volume, located at HeroChoosePointA with Z offset 0.00
Special Effect - Create a special effect at HeroChoosePointA using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation(udg_HeroChoosePointA)
Unit - Hide Hero[HeroINTEGER[(Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))])]]
Player Group - Remove (Owner of (Triggering unit)) from PlayersViewingCinPG
Set Hero_Taken[HeroINTEGER[(Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))])]] = True
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Triggering unit)) is in Team1) Equal to True
Then - Actions
Set HeroChoosePointA = (Center of Team1StartZone <gen>)
Unit - Create 1 HeroType[HeroINTEGER[(Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))])]] for (Owner of (Triggering unit)) at HeroChoosePointA facing 0.00 degrees
Custom script: call RemoveLocation(udg_HeroChoosePointA)
Multiboard - Set the icon for ScoreMultiboard item in column 1, row ((Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))]) + 1) to HeroIcon[HeroINTEGER[(Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))])]]
Else - Actions
Set HeroChoosePointA = (Center of Team2StartZone <gen>)
Unit - Create 1 HeroType[HeroINTEGER[(Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))])]] for (Owner of (Triggering unit)) at HeroChoosePointA facing 180.00 degrees
Multiboard - Set the icon for ScoreMultiboard item in column 1, row ((Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))]) + 2) to HeroIcon[HeroINTEGER[(Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))])]]
Custom script: call RemoveLocation(udg_HeroChoosePointA)
Set PlayerHero[(Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))])] = (Last created unit)
Player Group - Add (Owner of (Triggering unit)) to PlayersWithHeroesPG
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Triggering unit)) is in Team1) Equal to True
Then - Actions
Set HeroChoosePointA = (Center of Team1StartZone <gen>)
Camera - Pan camera for (Owner of (Triggering unit)) to HeroChoosePointA over 1.00 seconds
Custom script: call RemoveLocation(udg_HeroChoosePointA)
Else - Actions
Set HeroChoosePointA = (Center of Team2StartZone <gen>)
Camera - Pan camera for (Owner of (Triggering unit)) to HeroChoosePointA over 1.00 seconds
Custom script: call RemoveLocation(udg_HeroChoosePointA)
Game - Display to (All players matching (((Matching player) is in PlayersViewingCinPG) Equal to False)) for 9.00 seconds the text: (PlayerColor[(Player number of (Owner of (Triggering unit)))] + (((Name of (Owner of (Triggering unit))) + |r) + ( has chosen + (PlayerColor[(Player number of (Owner of (Triggering unit)))] + ((Name of PlayerHero[(Player number of PlayerArray[(Player number
Set ChosenTextPG = (Player group((Owner of (Triggering unit))))
Game - Display to ChosenTextPG for 9.00 seconds the text: |C0099CC99You may r...
Game - Display to ChosenTextPG for 9.00 seconds the text: |C0099CC99You can t...
Game - Display to ChosenTextPG for 9.00 seconds the text: |c0099CC99USE your ...
Custom script: call DestroyForce(udg_ChosenTextPG)
Hero - Create |c007EBFF1Mercenary Soldier Contract|r and give it to PlayerHero[(Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))])]
Selection - Select PlayerHero[(Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))])] for (Owner of (Triggering unit))
Sound - Play HeroSpawned <gen> at 100.00% volume, attached to PlayerHero[(Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))])]
Special Effect - Create a special effect attached to the origin of PlayerHero[(Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))])] using Abilities\Spells\Other\Awaken\Awaken.mdl
Special Effect - Destroy (Last created special effect)
Set SpiritPicker[(Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))])] = No unit
Unit - Remove (Triggering unit) from the game
Trigger - Run Hero Cinematic Skip OFF <gen> (checking conditions)
-------- should prvent someone from randming/repicking this hero but dosnt --------
Set Random_Data[HeroINTEGER[(Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))])]] = Random_Count
Set Random_Count = (Random_Count - 1)
-------- reduces random count by 1 preventing the last hero frombeing taken --------

MASTER HERO RANDOM TRIGGER

Random Hero
Events
Unit - A unit enters RandomRegion <gen>
Conditions
(Unit-type of (Triggering unit)) Equal to Spirit (Hero Picker)
Actions
Trigger - Turn off (This trigger)
Set RandomHero = (Random integer number between 1 and Random_Count)
-------- TEST RANDOM --------
Set RandomPoint = (Center of RandomRegion <gen>)
Sound - Play HeroChosen <gen> at 100.00% volume, located at RandomPoint with Z offset 0.00
Special Effect - Create a special effect at RandomPoint using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation(udg_RandomPoint)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Triggering unit)) is in Team1) Equal to True
Then - Actions
Set RandomPoint = (Center of Team1StartZone <gen>)
Unit - Create 1 HeroType[Random_Data[RandomHero]] for (Owner of (Triggering unit)) at RandomPoint facing 0.00 degrees
Multiboard - Set the icon for ScoreMultiboard item in column 1, row ((Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))]) + 1) to HeroIcon[Random_Data[RandomHero]]
Else - Actions
Set RandomPoint = (Center of Team2StartZone <gen>)
Unit - Create 1 HeroType[Random_Data[RandomHero]] for (Owner of (Triggering unit)) at RandomPoint facing 180.00 degrees
Multiboard - Set the icon for ScoreMultiboard item in column 1, row ((Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))]) + 2) to HeroIcon[Random_Data[RandomHero]]
Set PlayerHero[(Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))])] = (Last created unit)
Custom script: call RemoveLocation(udg_RandomPoint)
Player Group - Add (Owner of (Triggering unit)) to PlayersWithHeroesPG
Set RanUnitType = (Unit-type of (Last created unit))
Selection - Select (Last created unit) for (Owner of (Triggering unit))
Hero - Create |c007EBFF1Mercenary Soldier Contract|r and give it to (Last created unit)
-------- GET UNIT TYPE OF LAST CREATED UNIT --------
Unit Group - Pick every unit in (Units in HeroSelectionRegion <gen> matching ((Unit-type of (Matching unit)) Equal to RanUnitType)) and do (Actions)
Loop - Actions
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
Special Effect - Destroy (Last created special effect)
Set RandomPoint = (Position of (Picked unit))
Sound - Play HeroChosen <gen> at 100.00% volume, located at RandomPoint with Z offset 0.00
Custom script: call RemoveLocation(udg_RandomPoint)
Unit - Hide (Picked unit)
Set Hero_Taken[Random_Data[RandomHero]] = True
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Triggering unit)) is in Team1) Equal to True
Then - Actions
Set RandomPoint = (Center of Team1StartZone <gen>)
Camera - Pan camera for (Owner of (Triggering unit)) to RandomPoint over 1.00 seconds
Else - Actions
Set RandomPoint = (Center of Team2StartZone <gen>)
Camera - Pan camera for (Owner of (Triggering unit)) to RandomPoint over 1.00 seconds
Custom script: call RemoveLocation(udg_RandomPoint)
Sound - Play HeroSpawned <gen> at 100.00% volume, attached to (Last created unit)
Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Other\Awaken\Awaken.mdl
Special Effect - Destroy (Last created special effect)
Game - Display to (All players matching (((Matching player) is in PlayersViewingCinPG) Equal to False)) for 9.00 seconds the text: (PlayerColor[(Player number of (Owner of (Triggering unit)))] + (((Name of (Owner of (Triggering unit))) + |r) + ( has randomly chosen + (PlayerColor[(Player number of (Owner of (Triggering unit)))] + ((Name of (Last created unit)) + |r!)))))
Set RandomTextPG = (Player group((Owner of (Triggering unit))))
Game - Display to RandomTextPG for 9.00 seconds the text: |C0099CC99You may r...
Game - Display to RandomTextPG for 9.00 seconds the text: |C0099CC99You can t...
Game - Display to RandomTextPG for 9.00 seconds the text: |c0099CC99USE your ...
Custom script: call DestroyForce(udg_RandomTextPG)
Set Random_Data[RandomHero] = Random_Count
-------- SEARCH FOR THIS ^^ --------
Set Random_Count = (Random_Count - 1)
Set SpiritPicker[(Player number of PlayerArray[(Player number of (Owner of (Triggering unit)))])] = No unit
Unit - Remove (Triggering unit) from the game
Trigger - Run Hero Cinematic Skip OFF <gen> (checking conditions)
Trigger - Turn on (This trigger)

MASTER HERO -REPICK TRIGGER
Repick Hero
Events
Player - Player 1 (Red) types a chat message containing -repick as An exact match
Player - Player 2 (Blue) types a chat message containing -repick as An exact match
Player - Player 3 (Teal) types a chat message containing -repick as An exact match
Player - Player 4 (Purple) types a chat message containing -repick as An exact match
Player - Player 5 (Yellow) types a chat message containing -repick as An exact match
Player - Player 6 (Orange) types a chat message containing -repick as An exact match
Player - Player 7 (Green) types a chat message containing -repick as An exact match
Player - Player 8 (Pink) types a chat message containing -repick as An exact match
Player - Player 11 (Dark Green) types a chat message containing -repick as An exact match
Player - Player 12 (Brown) types a chat message containing -repick as An exact match
Conditions
And - All (Conditions) are true
Conditions
PlayerHero[(Player number of PlayerArray[(Player number of (Triggering player))])] Not equal to No unit
Or - Any (Conditions) are true
Conditions
((Triggering player) is in Team1) Equal to True
((Triggering player) is in Team2) Equal to True
Actions
Trigger - Turn off (This trigger)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering player) Current gold) Less than 250
Then - Actions
Set RepickTextPG = (Player group((Triggering player)))
Game - Display to RepickTextPG the text: ((|c00FF0033 + You do not have enough Gold to repick your Hero.) + |r)
Custom script: call DestroyForce(udg_RepickTextPG)
Else - Actions
Player - Add -250 to (Triggering player) Current gold
Set RepickTextPG = (Player group((Triggering player)))
Cinematic - Clear the screen of text messages for RepickTextPG
Custom script: call DestroyForce(udg_RepickTextPG)
Game - Display to (All players matching (((Matching player) is in PlayersViewingCinPG) Equal to False)) for 9.00 seconds the text: (PlayerColor[(Player number of (Triggering player))] + (((Name of (Triggering player)) + |r) + has repicked thier hero at a cost of 250 Gold!))
Set RepickedHeroType = (Unit-type of PlayerHero[(Player number of PlayerArray[(Player number of (Triggering player))])])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Item carried by PlayerHero[(Player number of PlayerArray[(Player number of (Triggering player))])] in slot 1) Not equal to No item
(Item carried by PlayerHero[(Player number of PlayerArray[(Player number of (Triggering player))])] in slot 2) Not equal to No item
(Item carried by PlayerHero[(Player number of PlayerArray[(Player number of (Triggering player))])] in slot 3) Not equal to No item
(Item carried by PlayerHero[(Player number of PlayerArray[(Player number of (Triggering player))])] in slot 4) Not equal to No item
(Item carried by PlayerHero[(Player number of PlayerArray[(Player number of (Triggering player))])] in slot 5) Not equal to No item
(Item carried by PlayerHero[(Player number of PlayerArray[(Player number of (Triggering player))])] in slot 6) Not equal to No item
Then - Actions
-------- Actually need to store any items they have --------
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Hero - Give (Item carried by PlayerHero[(Player number of PlayerArray[(Player number of (Triggering player))])] in slot (Integer A)) to StashUnit[(Player number of PlayerArray[(Player number of (Triggering player))])]
Set RepickTextPG = (Player group((Triggering player)))
Game - Display to RepickTextPG for 9.00 seconds the text: (The items you were...
Custom script: call DestroyForce(udg_RepickTextPG)
Set StashPoint = (Position of StashUnit[(Player number of PlayerArray[(Player number of (Triggering player))])])
Set RepickTextPG = (Player group((Triggering player)))
Cinematic - Ping minimap for RepickTextPG at StashPoint for 4.00 seconds, using a Flashy ping of color (50.00%, 100.00%, 50.00%)
Custom script: call DestroyForce(udg_RepickTextPG)
Sound - Play HeroChosen <gen> at 100.00% volume, located at StashPoint with Z offset 0.00
Special Effect - Create a special effect at StashPoint using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation(udg_StashPoint)
Else - Actions
Do nothing
-------- End Give Items --------
Unit - Remove PlayerHero[(Player number of PlayerArray[(Player number of (Triggering player))])] from the game
-------- RANDOM NEW HERO --------
Set RandomHero = (Random integer number between 1 and Random_Count)
-------- it is possible to get the same hero.. --------
-------- why? because theyve randomed it or taken it before so it shouldnt be possible. --------
Set RepickPoint = (Center of RandomRegion <gen>)
Sound - Play HeroChosen <gen> at 100.00% volume, located at RepickPoint with Z offset 0.00
Special Effect - Create a special effect at RepickPoint using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
Special Effect - Destroy (Last created special effect)
Custom script: call RemoveLocation(udg_RepickPoint)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering player) is in Team1) Equal to True
Then - Actions
Set RepickPoint = (Center of Team1StartZone <gen>)
Unit - Create 1 HeroType[Random_Data[RandomHero]] for (Triggering player) at RepickPoint facing 0.00 degrees
Custom script: call RemoveLocation(udg_RepickPoint)
Multiboard - Set the icon for ScoreMultiboard item in column 1, row ((Player number of PlayerArray[(Player number of (Triggering player))]) + 1) to HeroIcon[Random_Data[RandomHero]]
Else - Actions
Set RepickPoint = (Center of Team2StartZone <gen>)
Unit - Create 1 HeroType[Random_Data[RandomHero]] for (Triggering player) at RepickPoint facing 180.00 degrees
Custom script: call RemoveLocation(udg_RepickPoint)
Multiboard - Set the icon for ScoreMultiboard item in column 1, row ((Player number of PlayerArray[(Player number of (Triggering player))]) + 2) to HeroIcon[Random_Data[RandomHero]]
Set PlayerHero[(Player number of PlayerArray[(Player number of (Triggering player))])] = (Last created unit)
Set RanUnitType = (Unit-type of (Last created unit))
-------- GIVE SCROLL BACK TO NEW HERO --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(StashUnit[(Player number of (Triggering player))] has an item of type |c007EBFF1Mercenary Soldier Contract|r) Equal to True
Then - Actions
Hero - Give (Item carried by StashUnit[(Player number of PlayerArray[(Player number of (Triggering player))])] of type |c007EBFF1Mercenary Soldier Contract|r) to PlayerHero[(Player number of (Triggering player))]
Else - Actions
Do nothing
Selection - Select (Last created unit) for (Triggering player)
-------- GET UNIT TYPE OF LAST CREATED UNIT --------
Unit Group - Pick every unit in (Units in HeroSelectionRegion <gen> matching ((Unit-type of (Matching unit)) Equal to RanUnitType)) and do (Actions)
Loop - Actions
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
Special Effect - Destroy (Last created special effect)
Set RepickPoint = (Center of RandomRegion <gen>)
Sound - Play HeroChosen <gen> at 100.00% volume, located at RepickPoint with Z offset 0.00
Custom script: call RemoveLocation(udg_RepickPoint)
Unit - Hide (Picked unit)
Set Hero_Taken[Random_Data[RandomHero]] = True
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering player) is in Team1) Equal to True
Then - Actions
Set RepickPoint = (Center of Team1StartZone <gen>)
Camera - Pan camera for (Triggering player) to RepickPoint over 1.00 seconds
Custom script: call RemoveLocation(udg_RepickPoint)
Else - Actions
Set RepickPoint = (Center of Team2StartZone <gen>)
Camera - Pan camera for (Triggering player) to RepickPoint over 1.00 seconds
Custom script: call RemoveLocation(udg_RepickPoint)
Sound - Play HeroSpawned <gen> at 100.00% volume, attached to (Last created unit)
Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Other\Awaken\Awaken.mdl
Special Effect - Destroy (Last created special effect)
Game - Display to (All players matching (((Matching player) is in PlayersViewingCinPG) Equal to False)) for 9.00 seconds the text: (PlayerColor[(Player number of (Triggering player))] + (((Name of (Triggering player)) + |r) + ( has randomly chosen + (PlayerColor[(Player number of (Triggering player))] + ((Name of (Last created unit)) + |r!)))))
-------- END RANDOM NEW HERO --------
-------- REINSERT UNWANTED HERO --------
For each (Integer RepickInteger) from 1 to 25, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
RepickedHeroType Equal to HeroType[RepickInteger]
Then - Actions
Set Hero_Taken[RepickInteger] = False
-------- ALLOWS THE HERO TO BE RE-RANDOMED --------
Set Random_Data[RandomHero] = RepickInteger
Unit - Unhide Hero[RepickInteger]
Else - Actions
Do nothing
-------- END REINSERT UNWANTED HERO --------
Wait 0.10 seconds
Trigger - Turn on (This trigger)
__________________
ROTG-Creator.
Before you ask something, at least attempt it yourself, else you'll only have to ask everything in life.

http://www.rotg.co.uk
http://www.clan-volt.batcave.net
Steelb_l_ade is offline  
Old 04-02-2008, 11:01 PM   #2 (permalink)
Registered User DesKaladA
Guess my new project
 
DesKaladA's Avatar
 
Join Date: Jun 2007
Posts: 1,601
DesKaladA is a jewel in the rough (176)
thats simple all that needs to happen is to inject the repickable hero into the same system that the manual pick uses
__________________

Get A Better Message bar for your Project
Click Here



Click On Mai Eggz

DesKaladA is offline  
Old 04-02-2008, 11:06 PM   #3 (permalink)
Registered User Steelb_l_ade
Creator of ROTG
 
Steelb_l_ade's Avatar
 
Join Date: Apr 2006
Posts: 185
Steelb_l_ade is on a distinguished road (75)Steelb_l_ade is on a distinguished road (75)
PayPal Donor: This user has donated at least $20 to The Hive. 
they both use the same system of arrays.
__________________
ROTG-Creator.
Before you ask something, at least attempt it yourself, else you'll only have to ask everything in life.

http://www.rotg.co.uk
http://www.clan-volt.batcave.net
Steelb_l_ade is offline  
Old 04-02-2008, 11:06 PM   #4 (permalink)
Registered User Steelb_l_ade
Creator of ROTG
 
Steelb_l_ade's Avatar
 
Join Date: Apr 2006
Posts: 185
Steelb_l_ade is on a distinguished road (75)Steelb_l_ade is on a distinguished road (75)
PayPal Donor: This user has donated at least $20 to The Hive. 
also, the re-inertion si fine..its the fact that on the 2nd or more -repick done in game its possible to obtain a hero someone already has.
__________________
ROTG-Creator.
Before you ask something, at least attempt it yourself, else you'll only have to ask everything in life.

http://www.rotg.co.uk
http://www.clan-volt.batcave.net
Steelb_l_ade is offline  
Old 04-08-2008, 07:26 PM   1 links from elsewhere to this Post. Click to view. #5 (permalink)
Registered User Steelb_l_ade
Creator of ROTG
 
Steelb_l_ade's Avatar
 
Join Date: Apr 2006
Posts: 185
Steelb_l_ade is on a distinguished road (75)Steelb_l_ade is on a distinguished road (75)
PayPal Donor: This user has donated at least $20 to The Hive. 
Soem more thoughts on the topic, I watched a replay where the bug occurs and noted down the order pple got thier heroes in. See if u can make some sense of this:

PLAYER 3 MANUALLY PICKS SEA DRAKE
hero[24]
randomdata[24] =25
random count =24

PLAYER 7 MANUALLY CHOOSES SWORD MASTER
hero[10]
randomdata[10] =24 <used to =10
random count =23

PLAYER 1 MANUALLY CHOOSES JUNGLE TROLL
hero[17]
randomdata[17] =23
random count =22

PLAYER 2 MANUALLY CHOOSES BARB
hero[12]
randomdata[12] =22
random count =21


PLAYER 5 MANUALLY PICKS DRUID
hero[1]
randomdata[1] =21
random count =20

PLAYER 6 MANUALLY CHOOSES ELVEN RANGER
hero[6]
randomdata[6] =20
random count =19

PLAYER 4 MANUALLY CHOOSES DEMON
hero[3]
randomdata[3] =19
random count =18

PLAYER 8 MANUALLY CHOOSES BURROWER
hero[7]
randomdata[7] =18
random count =17


PLAYER 1 LOSES TROLL AND PICKS LICH (REPICK)
randoms lich
so
randomhero=1
because randomdata[1]=21 <<<<<<<thats how it possible to return a value of 21 when ran count is max 17
so randomdata[randomhero]=21
so
REINSERTIONT
troll has a herotype of herotype[17]
hero taken[17]=false
randomdata[21]=17
===end extra


PLAYER 1 LOSES LICH AND PICKS SEA DRAKE (REPICK BUG)
randoms drake
so
randomhero= X
so
so randomdata[randomhero]=must equal 24.
REINSERTION
lich has a herotype of herotype[21]
hero taken[21]=false
randomdata[x]=21

key must be in this ran data thing

so randomdata[1]=1 etc and this is changed when a player chooses a hero, its set to a val beyond that of random count techncially makign ti impossible to get that hero again. ~The problem is that pple can repick and get a hero someone already has.
__________________
ROTG-Creator.
Before you ask something, at least attempt it yourself, else you'll only have to ask everything in life.

http://www.rotg.co.uk
http://www.clan-volt.batcave.net
Steelb_l_ade is offline  
Closed Thread

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


LinkBacks (?)
LinkBack to this Thread: http://www.hiveworkshop.com/forums/bug-reporting-technical-issues-357/random-repick-multiple-heroes-65206/
Posted By For Type Date
Wondering - Requiem Of The Gods Post #0 Refback 12-10-2008 10:42 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Trigger] -Repick Trigger Help Smoothcrm7 Triggers & Scripts 2 03-28-2008 06:30 PM
[Trigger] Random Heroes Redeemer59 Triggers & Scripts 4 03-03-2008 11:43 PM
Random Heroes GodsHand World Editor Help Zone 4 11-25-2007 11:57 AM
Random Heroes "help" JyrKz Map Development 3 04-26-2005 01:00 AM
Repick oO?! Spiffy Map Development 0 08-15-2004 09:11 PM

All times are GMT. The time now is 09:36 PM.





Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.1
Copyright©Ralle