- Joined
- Mar 17, 2016
- Messages
- 18
[Solved] Problem reviving mulitple Heroes
Hi there!
I'm using an advanced creep revival system originaly created by Tinki3 which works flawlessly.
The system uses a Wait, before reviving "Triggering Unit" which means multiple units may be "dead" (waiting to be revived) at the same time and here comes my problem.
It seems like a maximum of 7 units can be stored and refererred to as a "Triggering Unit" at once.
This results in units not being revived when more than 7 units are "dead" at the same time and when you use a 60 second Wait like I do... alot of units are being forgotten.
Revived unit is always a hero using "Hero - Instantly revive (Triggering Unit)..."
Is there a way to increase this 7 unit cap? If not, is there another efficient way to store and refer to Triggering/Dying unit?
Edit
The problem seems to be the heroes, not that (Triggering Unit) can't store more than 7 units. The problem only occurs when heroes are waiting to become revived.
Solution
The main problem was that only seven heroes could be dead at the same time. When the eighth hero died, the hero that died first was permanently removed from the game. This happened frequently during my "wait"-function. That's why I removed the "wait" and revived the hero instantly at an area outside playable map area. The "wait"-function now occurs when hero is already revived! Simple fix.
In conclusion: By reviving the unit instantly when it is killed, we avoid the problem that Warcraft can only store 7 dead heroes (per player). By reviving it outside the map, we're simulating it being dead.
Hi there!
I'm using an advanced creep revival system originaly created by Tinki3 which works flawlessly.
The system uses a Wait, before reviving "Triggering Unit" which means multiple units may be "dead" (waiting to be revived) at the same time and here comes my problem.
It seems like a maximum of 7 units can be stored and refererred to as a "Triggering Unit" at once.
This results in units not being revived when more than 7 units are "dead" at the same time and when you use a 60 second Wait like I do... alot of units are being forgotten.
Revived unit is always a hero using "Hero - Instantly revive (Triggering Unit)..."
Is there a way to increase this 7 unit cap? If not, is there another efficient way to store and refer to Triggering/Dying unit?
-
Creep Setup
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in (Units in (Playable map area) owned by Player 11 (Dark Green)) and do (Actions)
-
Loop - Actions
-
Set CreepInteger = (CreepInteger + 1)
-
Unit - Set the custom value of (Picked unit) to CreepInteger
-
Custom script: set udg_CreepXValue[udg_CreepInteger] = GetUnitX(GetEnumUnit())
-
Custom script: set udg_CreepYValue[udg_CreepInteger] = GetUnitY(GetEnumUnit())
-
-
-
-
The problem seems to be the heroes, not that (Triggering Unit) can't store more than 7 units. The problem only occurs when heroes are waiting to become revived.
Solution
The main problem was that only seven heroes could be dead at the same time. When the eighth hero died, the hero that died first was permanently removed from the game. This happened frequently during my "wait"-function. That's why I removed the "wait" and revived the hero instantly at an area outside playable map area. The "wait"-function now occurs when hero is already revived! Simple fix.
-
Basic Creep Revive
-
Events
-
Unit - A unit owned by Player 11 (Dark Green) Dies
-
-
Conditions
-
Actions
-
Wait 60.00 seconds
-
Set TempPoint = ((Point(0.00, 0.00)) offset by (CreepXValue[(Custom value of (Triggering unit))], CreepYValue[(Custom value of (Triggering unit))]))
-
Hero - Instantly revive (Triggering unit) at TempPoint, Hide revival graphics
-
Custom script: call RemoveLocation (udg_TempPoint)
-
Unit - Set the custom value of (Last created unit) to (Custom value of (Triggering unit))
-
Hero - Set (Last created unit) Hero-level to ((Hero level of (Triggering unit)) + 4), Hide level-up graphics
-
-
-
INSTANT Revive
-
Events
-
Unit - A unit owned by Player 11 (Dark Green) Dies
-
-
Conditions
-
Actions
-
Set TempPoint = (Center of CreepRevivalArea <gen>)
-
Unit - Create 1 (Unit-type of (Triggering unit)) for Player 11 (Dark Green) at TempPoint facing Default building facing degrees
-
Custom script: call RemoveLocation (udg_TempPoint)
-
Unit - Set the custom value of (Last created unit) to (Custom value of (Triggering unit))
-
Hero - Set (Last created unit) Hero-level to ((Hero level of (Triggering unit)) + 4), Hide level-up graphics
-
-
-
Revival time and Teleportation
-
Events
-
Unit - A unit enters CreepRevivalArea <gen>
-
-
Conditions
-
Actions
-
Wait 60.00 seconds
-
Set TempPoint = ((Point(0.00, 0.00)) offset by (CreepXValue[(Custom value of (Triggering unit))], CreepYValue[(Custom value of (Triggering unit))]))
-
Unit - Move (Triggering unit) instantly to TempPoint
-
Custom script: call RemoveLocation (udg_TempPoint)
-
-
In conclusion: By reviving the unit instantly when it is killed, we avoid the problem that Warcraft can only store 7 dead heroes (per player). By reviving it outside the map, we're simulating it being dead.
1. Using Local Variables:
2. Making the heroes normal units and then add abilities that add to unit's health, defence, attack speed etc.
For each revive, the abilities would be set to a higher level, making the unit more powerful.
-
Basic Creep Revive
-
Events
-
Unit - A unit owned by Player 11 (Dark Green) Dies
-
Conditions
-
Actions
-
Custom script: local unittype array udg_TempUnitType
-
Custom script: local location array udg_TempLocation
-
Custom script: local integer array udg_TempInteger
-
Set TempInteger[0] = (CreepId[(Custom value of (Triggering unit))])
-
Set TempUnitType[0] = (Unit-type of (Triggering unit))
-
Set TempLocation[0] = (CreepLocValue[TempInteger[0]])
-
Set TempInteger[1] = (Hero experience of (Triggering unit))
-
Wait 60.00 game-time seconds
-
Unit - Create 1 TempUnitType[0] for Player 11 (Dark Green) at TempLocation[0] facing Default building facing degrees
-
Hero - Set (Last created unit) experience to TempInteger[1], Hide level-up graphics
-
Set CreepId[(Custom value of (Last created unit))] = (TempInteger[0])
-
Custom script: call RemoveLocation(udg_TempLocation[0])
-
Custom script: set udg_TempLocation[0] = null
2. Making the heroes normal units and then add abilities that add to unit's health, defence, attack speed etc.
For each revive, the abilities would be set to a higher level, making the unit more powerful.
Last edited: