• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] hero revive problem

Status
Not open for further replies.
Level 3
Joined
Aug 7, 2007
Messages
27
k, im doing a AOS kind of map, or at least i try to do such a map ;)
I did a hero revival trigger pair, which works perfectly for every player besides the first one ;/ and i have NO clue why.
So I will explain the variables first:
HeroDeath is an array which saves the unit that died within itself.
Deathtime is an array that saves the calculated period of time a ddead hero remains dead.
And the final one: Deathcheckcounter is a simple integer(no array) which is used to define if all(!) heros are alive or not

  • Hero Dies
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set HeroDeath[(Player number of (Owner of (Triggering unit)))] = (Dying unit)
      • Set Deathtime[(Player number of (Owner of (Triggering unit)))] = (10 + ((Hero level of (Triggering unit)) x 2))
      • Multiboard - Set the text for Multiboard item in column 5, row (1 + (Player number of (Owner of (Triggering unit)))) to (String(Deathtime[(Player number of (Owner of (Triggering unit)))]))
      • If ((Leaderboard update <gen> is on) Equal to True) then do (Do nothing) else do (Trigger - Turn on Leaderboard update <gen>)
I added the "display to all players" part for testing purpose only.
Well the following Trigger does these things:
Counts once every second from 1 to 12, and checks by using these numbers if an array matches the "if"-conditions.
Deathime is decreased by one every second and deatcheckcounter is increased by one if a hero saved within "herodeath[x]" is alive again.
If this variable reaches 12, the trigger is turned off.

  • Leaderboard update
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (String(Deathcheckcounter))
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Real(Deathtime[(Integer A)])) Greater than or equal to 1.00
              • (HeroDeath[(Integer A)] is dead) Equal to True
            • Then - Actions
              • Set Deathtime[(Integer A)] = (Deathtime[(Integer A)] - 1)
              • Multiboard - Set the text for (Last created multiboard) item in column 5, row (1 + (Integer A)) to (String(Deathtime[(Integer A)]))
              • Set Deathcheckcounter = 0
            • Else - Actions
              • Multiboard - Set the text for Multiboard item in column 5, row (1 + (Integer A)) to <Empty String>
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (HeroDeath[(Integer A)] is dead) Equal to True
                • Then - Actions
                  • Hero - Instantly revive HeroDeath[(Integer A)] at (Center of Target of the Teleport <gen>), Show revival graphics
                • Else - Actions
                  • Do nothing
              • Set Deathcheckcounter = (Deathcheckcounter + 1)
              • If (Deathcheckcounter Equal to 12) then do (Trigger - Turn off (This trigger)) else do (Do nothing)
here is a picture of that trigger
http://img407.imageshack.us/img407/6263/warcraftcr6.jpg

first one should be easy to understand.


ok so my situation is the following:
Everything(!) related to the multiboard and all heros beside the one of player 1 is working.
But heroes of player one do not get revived. The death time is counted down on the leaderboard and vanishs if it gets to zero, but the hero doesnt get revived.
I tried it with 2 players and 12 players, but still, player 1 doesnt work properly ;/ i have absolutly no clue what that is the case ;/
i hope someone here can help me :)
Thanks for any advice
 
Last edited by a moderator:
Level 3
Joined
Aug 7, 2007
Messages
27
but why? it works fine for all the other heroes ;/ i thought about it only saving the unittype(would be hero), because i had in the beginning 3 heros for player 1 on the field. But didnt work with only one hero either ;/

edit: the problem has to do with player 1, not with a non-computer player. I changed myself to player 7 and it worked for me
 
Last edited:
Status
Not open for further replies.
Top