HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Pick dead hero in unit group

09-21-2008, 10:48 PM#1
botanic
I think the problem is with the picking of the dead hero in the second trigger =/

any ideas?

Trigger:
Revive
Collapse Events
Unit - A unit Dies
Collapse Conditions
Collapse And - All (Conditions) are true
Collapse Conditions
((Triggering unit) is A Hero) Equal to True
Collapse Actions
Set Revive[(Player number of (Owner of (Dying unit)))] = (Hero level of (Dying unit))
Trigger - Turn on Update Revive <gen>
Unit Group - Add (Dying unit) to DeadHero
Wait until (Revive[(Player number of (Owner of (Dying unit)))] Equal to 0), checking every 0.10 seconds
Multiboard - Set the text for Multiboard item in column 4, row (PlayerCustInt[(Player number of (Owner of (Dying unit)))] + 1) to
Set TempPoint = (Center of Revive North <gen>)
Hero - Instantly revive (Triggering unit) at TempPoint, Show revival graphics
Custom script: call RemoveLocation(udg_TempPoint)
Unit Group - Remove (Triggering unit) from DeadHero

Trigger:
Update Revive
Collapse Events
Time - Every 1.00 seconds of game time
Conditions
Collapse Actions
Collapse Unit Group - Pick every unit in DeadHero and do (Actions)
Collapse Loop - Actions
Multiboard - Set the text for Multiboard item in column 4, row (PlayerCustInt[(Player number of (Owner of (Picked unit)))] + 1) to (String(Revive[(Player number of (Owner of (Picked unit)))]))
Set Revive[(Player number of (Owner of (Picked unit)))] = Revive[(Player number of (Owner of (Picked unit)))]
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Number of units in DeadHero) Equal to 0
Collapse Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
09-22-2008, 04:56 AM#2
rulerofiron99
Set Revive[(Player number of (Owner of (Picked unit)))] = Revive[(Player number of (Owner of (Picked unit)))]

Shouldn't this reduce it by 1?
09-22-2008, 06:26 AM#3
botanic
well that was defensively a bug >.< didn't fix it tho the hero is nearly instantly revived... prolly just the .1 delay on the checking conditions wait

PS: yes i know i could use timers in jass or w/e just id rather just make it work a trigger that fires a few times a game really isnt worth the trouble (to me) to spend 80x the amount of time making it in jass.