• 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] Another Hero revive problem..

Status
Not open for further replies.
Level 3
Joined
Dec 22, 2007
Messages
28
Heya

I just got a problem with my hero reviving system: It doesn't display the time remaning until the revive of the hero.

My trigger (only in this one is a problem):

  • Death
    • Events
      • Unit - A unit dies
    • Conditions
      • ((Dying unit) is a hero) equal to true
    • Actions
      • Unit Group - Add (Dying unit) to deathheroes
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Conditions
          • ((Owner of (Dying unit)) is an ally of Player 1 (Red)) equal to True
        • 'THEN'-Actions
          • Players - Add killinggold to (Owner of (Killing unit)) actual gold amount
          • Players - Add (0 - killinggold) to (Owner of (Dying unit)) actual gold amount
          • Game - Display to (All players) the text: ((playernames[(Player number of (Owner of (Killing unit)))] + |cffFFFF00just owned|R ) + (playernames[(Player number of (Owner of (Dying unit)))] + ( |cffFFFF00for|r |cffFFFF00 + ((String(killinggold)) + |r |cffFFFF00gold!!|r))))
          • Set revivaltime[(Player number of (Owner of (Dying unit)))] = (((Real((Hero level of (Dying unit)))) x 3.00) + 5.00)
          • Countdown Timer - Start deathtimer[(Player number of (Owner of (Dying unit)))] as a One-Shot Timer that will expire in revivaltime[(Player number of (Owner of (Dying unit)))] seconds
          • Countdown Timer - Create a timer window for (Last started timer) with title Revive in ..
          • Set revivaltimerwindow[(Player number of (Owner of (Dying unit)))] = (Last created timer window)
          • Countdown Timer - Show (Last created timer window) for (Owner of (Dying unit))
          • Set killinggold = (killinggold + 10)
        • Else Actions
          • //the same actions as the "Then - Actions" for now.

Btw: Trigger translated from German (so not perfect equal to true xD)

I hope it's only a little misstake^^
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
Can't really find any problems.
Try using 'Triggering Unit' instead of 'Dying Unit' (Triggering Unit never bugs).

And on a side note, since you are using arrayes, you do not need the second condition (((Owner of (Dying unit)) is an ally of Player 1 (Red)) equal to True).
 
Level 3
Joined
Dec 22, 2007
Messages
28
Aw

Aww, it still doesn't work.. can you mby post another trigger like mine that works? I rly don't know whats the problem :/
 
Level 11
Joined
Dec 11, 2007
Messages
888
  • Death
    • Events
      • Unit - A unit dies
    • Conditions
      • ((Dying unit) is a hero) equal to true
    • Actions
      • Unit Group - Add (Dying unit) to deathheroes
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Conditions
          • ((Owner of (Dying unit)) is an ally of Player 1 (Red)) equal to True
        • 'THEN'-Actions
          • Players - Add killinggold to (Owner of (Killing unit)) actual gold amount
          • Players - Add (0 - killinggold) to (Owner of (Dying unit)) actual gold amount
          • Game - Display to (All players) the text: ((playernames[(Player number of (Owner of (Killing unit)))] + |cffFFFF00just owned|R ) + (playernames[(Player number of (Owner of (Dying unit)))] + ( |cffFFFF00for|r |cffFFFF00 + ((String(killinggold)) + |r |cffFFFF00gold!!|r))))
          • Set revivaltime[(Player number of (Owner of (Dying unit)))] = (((Real((Hero level of (Dying unit)))) x 3.00) + 5.00)
          • Countdown Timer - Start deathtimer[(Player number of (Owner of (Dying unit)))] as a One-Shot Timer that will expire in revivaltime[(Player number of (Owner of (Dying unit)))] seconds
          • Countdown Timer - Create a timer window for (Last started timer) with title Revive in ..
          • Set revivaltimerwindow[(Player number of (Owner of (Dying unit)))] = (Last created timer window)
          • Countdown Timer - Show (Last created timer window) for (Owner of (Dying unit))
          • Set killinggold = (killinggold + 10)
          • Wait - (revivaltime) seconds
          • Hero - Revive Dying unit instantly at region x
          • Countdown Timer - Destroy last created timer window
        • Else Actions
          • //the same actions as the "Then - Actions" for now.
I'm not sure it will work but you could try this one
 
Level 3
Joined
Dec 22, 2007
Messages
28
well this isnt the problem..

this

  • Set revivaltime[(Player number of (Owner of (Triggering unit)))] = (((Real((Hero level of (Triggering unit)))) x 3.00) + 5.00)
is the problem.. it doens't display a number for the var.

Edit: I tried it with:

  • Game - Display to (All players) the text: (String((Remaining time for (Last started timer))))
and it didn't worked..
 
Last edited:
Status
Not open for further replies.
Top