- Joined
- Dec 29, 2009
- Messages
- 931
Made this system for my map really quick..
..it's basic but I wanted to know if it can be simplified and if so how?
There are 12 seperate triggers for the "hero selected" part.
Each trigger is for a different circle of power w/ a region that the hero is standing in.
..it's basic but I wanted to know if it can be simplified and if so how?
-
HS Initialize
- Events
- Conditions
-
Actions
- -------- Hero Types --------
- Set HS_HeroType[1] = Aspect of Light
- Set HS_HeroType[2] = Huntress
- Set HS_HeroType[3] = Clergyman
- Set HS_HeroType[4] = Blademaster
- Set HS_HeroType[5] = Marksman
- Set HS_HeroType[6] = Mystic
- Set HS_HeroType[7] = Juggernaut
- Set HS_HeroType[8] = gen_DebugHero
- Set HS_HeroType[9] = Enchantress
- Set HS_HeroType[10] = Dragonlord
- Set HS_HeroType[11] = gen_DebugHero
- Set HS_HeroType[12] = gen_DebugHero
- -------- Facing Degrees --------
- Set HS_FacingDegree[1] = 270.00
- Set HS_FacingDegree[2] = 270.00
- Set HS_FacingDegree[3] = 270.00
- Set HS_FacingDegree[4] = 180.00
- Set HS_FacingDegree[5] = 180.00
- Set HS_FacingDegree[6] = 180.00
- Set HS_FacingDegree[7] = 90.00
- Set HS_FacingDegree[8] = 90.00
- Set HS_FacingDegree[9] = 90.00
- Set HS_FacingDegree[10] = 0.00
- Set HS_FacingDegree[11] = 0.00
- Set HS_FacingDegree[12] = 0.00
- -------- Regions --------
- Set HS_Region[1] = Hero 01 <gen>
- Set HS_Region[2] = Hero 02 <gen>
- Set HS_Region[3] = Hero 03 <gen>
- Set HS_Region[4] = Hero 04 <gen>
- Set HS_Region[5] = Hero 05 <gen>
- Set HS_Region[6] = Hero 06 <gen>
- Set HS_Region[7] = Hero 07 <gen>
- Set HS_Region[8] = Hero 08 <gen>
- Set HS_Region[9] = Hero 09 <gen>
- Set HS_Region[10] = Hero 10 <gen>
- Set HS_Region[11] = Hero 11 <gen>
- Set HS_Region[12] = Hero 12 <gen>
- -------- Spawn --------
-
For each (Integer HS_SpawnInt) from 1 to 12, do (Actions)
-
Loop - Actions
- Set HS_TempLoc = (Center of HS_Region[HS_SpawnInt])
- Unit - Create 1 HS_HeroType[HS_SpawnInt] for Neutral Passive at HS_TempLoc facing HS_FacingDegree[HS_SpawnInt] degrees
- Set HS_PassiveHero[HS_SpawnInt] = (Last created unit)
- Custom script: call RemoveLocation(udg_HS_TempLoc)
-
Loop - Actions
-
Select 01
-
Events
- Unit - A unit enters Hero 01 <gen>
-
Conditions
- (Triggering unit) Equal to gen_HeroSoul[(Player number of (Owner of (Triggering unit)))]
-
Actions
- Unit - Create 1 Backpack for (Owner of (Triggering unit)) at HR_RevivePoint[(Player number of (Owner of (Triggering unit)))] facing Default building facing degrees
- Set BP_Unit[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
- Set HS_TempLoc = (Position of HS_PassiveHero[1])
- Set gen_PlayerHero[(Player number of (Owner of (Triggering unit)))] = HS_PassiveHero[1]
- Unit - Move gen_PlayerHero[(Player number of (Owner of (Triggering unit)))] instantly to HR_RevivePoint[(Player number of (Owner of (Triggering unit)))], facing 0.00 degrees
- Unit - Change ownership of gen_PlayerHero[(Player number of (Owner of (Triggering unit)))] to (Owner of (Triggering unit)) and Change color
- Selection - Select gen_PlayerHero[(Player number of (Owner of (Triggering unit)))] for (Owner of (Triggering unit))
- Camera - Set the camera bounds for (Owner of (Triggering unit)) to (Playable map area)
- Camera - Pan camera for (Owner of (Triggering unit)) to HR_RevivePoint[(Player number of (Owner of (Triggering unit)))] over 0.00 seconds
- Destructible - Create a Icecrown Tree Wall at HS_TempLoc facing (Random angle) with scale 0.85 and variation (Random integer number between 0 and 9)
- Unit - Remove (Triggering unit) from the game
- Custom script: call RemoveLocation(udg_HS_TempLoc)
- Custom script: set udg_HS_PassiveHero[1] = null
- Trigger - Turn off (This trigger)
-
Events
Each trigger is for a different circle of power w/ a region that the hero is standing in.