- Joined
- Apr 28, 2006
- Messages
- 187
In old versions of ROTG there was a different trigger to choose every hero. This is because heroes are chosen by entering regions.
This is not practical as theres 30 heroes. This is the new trigger im working on for choosing any hero.
This is not practical as theres 30 heroes. This is the new trigger im working on for choosing any hero.
-
Hero1 working Copy
-
Events
- Unit - A unit enters Hero1 <gen>
- Unit - A unit enters Hero2 <gen>
- Unit - A unit enters Hero3 <gen>
-
Conditions
- (Unit-type of (Triggering unit)) Equal to Spirit (Hero Picker)
-
Actions
- Trigger - Turn off (This trigger)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Hero1 <gen> contains (Triggering unit)) Equal to True
-
Then - Actions
- Set HeroINTEGER = 1
- Game - Display to (All players) the text: (String(HeroINTEGER))
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Hero2 <gen> contains (Triggering unit)) Equal to True
-
Then - Actions
- Set HeroINTEGER = 2
- Game - Display to (All players) the text: (String(HeroINTEGER))
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Hero3 <gen> contains (Triggering unit)) Equal to True
-
Then - Actions
- Set HeroINTEGER = 3
- Game - Display to (All players) the text: (String(HeroINTEGER))
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Set HeroINTEGER = 1
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
- Hero_Taken[HeroINTEGER] Equal to 0
-
Or - Any (Conditions) are true
-
Conditions
- ((Owner of (Triggering unit)) is in Team1) Equal to True
- ((Owner of (Triggering unit)) is in Team2) Equal to True
-
Conditions
-
Conditions
-
And - All (Conditions) are true
-
Then - Actions
- Set Hero_Taken[HeroINTEGER] = 1
- Set PickingPlayer[HeroINTEGER] = (Owner of (Triggering unit))
- Unit - Remove (Triggering unit) from the game
- Sound - Play HeroChosen <gen> at 100.00% volume, located at (Position of Hero[HeroINTEGER]) with Z offset 0.00
- Special Effect - Create a special effect at (Position of Hero[HeroINTEGER]) using Abilities\Spells\Other\Monsoon\MonsoonBoltTarget.mdl
- Special Effect - Destroy (Last created special effect)
- Unit - Hide Hero[HeroINTEGER]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (PickingPlayer[HeroINTEGER] is in Team1) Equal to True
-
Then - Actions
- Unit - Create 1 HeroType[HeroINTEGER] for PickingPlayer[HeroINTEGER] at (Center of Team1StartZone <gen>) facing 0.00 degrees
- Set PlayerHero[(Player number of PickingPlayer[HeroINTEGER])] = (Last created unit)
- Camera - Pan camera for PickingPlayer[HeroINTEGER] to (Center of Team1StartZone <gen>) over 1.00 seconds
-
Else - Actions
- Unit - Create 1 HeroType[HeroINTEGER] for PickingPlayer[HeroINTEGER] at (Center of Team2StartZone <gen>) facing 180.00 degrees
- Set PlayerHero[(Player number of PickingPlayer[HeroINTEGER])] = (Last created unit)
- Camera - Pan camera for PickingPlayer[HeroINTEGER] to (Center of Team2StartZone <gen>) over 1.00 seconds
-
If - Conditions
- Game - Display to (All players) for 9.00 seconds the text: (PlayerColor[(Player number of PickingPlayer[HeroINTEGER])] + (((Name of PickingPlayer[HeroINTEGER]) + |r) + ( has chosen + (PlayerColor[(Player number of PickingPlayer[HeroINTEGER])] + ((Name of PlayerHero[(Player number of PickingPlayer[HeroINTEGER])]) + |
- Set ChosenTextPG = (Player group(PickingPlayer[HeroINTEGER]))
- 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...
- Custom script: call DestroyForce(udg_ChosenTextPG)
- Hero - Create |c007EBFF1Mercenary Contract|r and give it to PlayerHero[(Player number of PickingPlayer[HeroINTEGER])]
- Selection - Select PlayerHero[(Player number of PickingPlayer[HeroINTEGER])] for PickingPlayer[HeroINTEGER]
- Sound - Play HeroSpawned <gen> at 100.00% volume, attached to PlayerHero[(Player number of PickingPlayer[HeroINTEGER])]
- Special Effect - Create a special effect attached to the origin of PlayerHero[(Player number of PickingPlayer[HeroINTEGER])] using Abilities\Spells\Other\Awaken\Awaken.mdl
- Special Effect - Destroy (Last created special effect)
- Set Random_Count = (Random_Count - 1)
-
Else - Actions
- Do nothing
-
If - Conditions
-
Events