• 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] Trigger Not Working... Why!?!!?

Status
Not open for further replies.
Level 5
Joined
Jun 18, 2008
Messages
146
Hey, siDeKicK here,

My revive trigger for HERO's wont work... :cry:

Trigger:

  • Revive Hero
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Game - Display to (All players) the text: (Player_Colors[(Player number of (Owner of (Dying unit)))] + 's|r |cffFF7600hero has fallen! Revive in 10 seconds.|r)
      • Wait 10.00 seconds
      • Hero - Instantly revive (Triggering unit) at (Center of respawn <gen>), Show revival graphics
      • Special Effect - Create a special effect at (Position of (Reviving Hero)) using Abilities\Spells\Other\Awaken\Awaken.mdl
      • Special Effect - Destroy (Last created special effect)
anyone know Why :(?... it just wont REVIVE the hero that died

siDeKicK
 
Level 5
Joined
Jun 18, 2008
Messages
146
Your trigger isnt specific enough, change the unit that instantly revives from 'triggering unit' to 'dying unit'

For the trigger knows it could be trying to revive the killing unit.

Try that and see if that works.

tried that millions of times....
 
Level 17
Joined
May 6, 2008
Messages
1,598
Try to save the hero in a variable.

Oh and




Trigger related questions go to Triggers & Scripts.
 
Level 15
Joined
Sep 3, 2006
Messages
1,738
World Editor seems to do a good job replacing "Triggering Unit" and "Dying Unit" and all of the counterparts when you use "Wait - XX seconds".

This was something I found on TheHelper that seemed to work for me. It checks if the dying unit is a hero and displays a leaderboard which will be destroyed when it's finished. just change the region and the time:

  • Revival
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Custom script: local timerdialog WINDOW
      • Custom script: local integer HEROWAIT
      • Custom script: local timer OURTIMER
      • Custom script: local unit OURHERO
      • Custom script: set OURHERO = GetDyingUnit()
      • Custom script: set HEROWAIT = ( GetHeroLevel(OURHERO) * 3 )
      • Custom script: set OURTIMER = CreateTimer()
      • Custom script: call StartTimerBJ( OURTIMER, false, ( I2R(HEROWAIT) ))
      • Custom script: call CreateTimerDialogBJ( OURTIMER, GetHeroProperName(GetTriggerUnit()) )
      • Custom script: set WINDOW = GetLastCreatedTimerDialogBJ()
      • Custom script: call TimerDialogDisplayForPlayerBJ( true, WINDOW, GetOwningPlayer(OURHERO) )
      • Custom script: call PolledWait( HEROWAIT )
      • Custom script: call ReviveHeroLoc(OURHERO, GetRectCenter(gg_rct_Unit_Pick_Area), true )
      • Custom script: call PanCameraToTimedLocForPlayer( GetOwningPlayer(OURHERO), GetUnitLoc(OURHERO), 0.60 )
      • Custom script: call DestroyTimerDialog(WINDOW)
 
Level 5
Joined
Jun 18, 2008
Messages
146
World Editor seems to do a good job replacing "Triggering Unit" and "Dying Unit" and all of the counterparts when you use "Wait - XX seconds".

This was something I found on TheHelper that seemed to work for me. It checks if the dying unit is a hero and displays a leaderboard which will be destroyed when it's finished. just change the region and the time:

  • Revival
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Custom script: local timerdialog WINDOW
      • Custom script: local integer HEROWAIT
      • Custom script: local timer OURTIMER
      • Custom script: local unit OURHERO
      • Custom script: set OURHERO = GetDyingUnit()
      • Custom script: set HEROWAIT = ( GetHeroLevel(OURHERO) * 3 )
      • Custom script: set OURTIMER = CreateTimer()
      • Custom script: call StartTimerBJ( OURTIMER, false, ( I2R(HEROWAIT) ))
      • Custom script: call CreateTimerDialogBJ( OURTIMER, GetHeroProperName(GetTriggerUnit()) )
      • Custom script: set WINDOW = GetLastCreatedTimerDialogBJ()
      • Custom script: call TimerDialogDisplayForPlayerBJ( true, WINDOW, GetOwningPlayer(OURHERO) )
      • Custom script: call PolledWait( HEROWAIT )
      • Custom script: call ReviveHeroLoc(OURHERO, GetRectCenter(gg_rct_Unit_Pick_Area), true )
      • Custom script: call PanCameraToTimedLocForPlayer( GetOwningPlayer(OURHERO), GetUnitLoc(OURHERO), 0.60 )
      • Custom script: call DestroyTimerDialog(WINDOW)

!!??!??!?! I dont do jass... i suck @ it :(
That's plain jass and difficult to understand sometimes for gui-triggerers

yes.

Can anyone send the trigger for me, a fixed one :grin:?

siDeKicK
 
Level 3
Joined
Jun 3, 2008
Messages
52
Here's a semi-GUI version:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Custom script: local unit udg_DyingHero
      • Set DyingHero = (Triggering unit)
      • Game - Display to (All players) the text: A hero just died.
      • Wait 10.00 seconds
      • Hero - Instantly revive DyingHero at (Center of (Playable map area)), Show revival graphics
      • Set DyingHero = No unit
Make sure you have a global variable called "DyingHero" of type "Unit". Also I don't think the "Awaken" Special Effect is necessary since you already choose "Show Revival Graphics".
(Hopefully it's leak-free)
 
Level 7
Joined
Sep 5, 2006
Messages
333
remove the wait, there is a change another hero dead within the wait, and set the variables, therefor overwriting a hero, making it lost without reviving.
 
Level 5
Joined
Jun 18, 2008
Messages
146
Here's a semi-GUI version:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Custom script: local unit udg_DyingHero
      • Set DyingHero = (Triggering unit)
      • Game - Display to (All players) the text: A hero just died.
      • Wait 10.00 seconds
      • Hero - Instantly revive DyingHero at (Center of (Playable map area)), Show revival graphics
      • Set DyingHero = No unit
Make sure you have a global variable called "DyingHero" of type "Unit". Also I don't think the "Awaken" Special Effect is necessary since you already choose "Show Revival Graphics".
(Hopefully it's leak-free)

Still doesnt work....


remove the wait, there is a change another hero dead within the wait, and set the variables, therefor overwriting a hero, making it lost without reviving.

can you show me please?

Not even this trigger works:

  • respawn
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) is A Hero) Equal to True
        • Then - Actions
          • Hero - Instantly revive (Dying unit) at (Center of respawn <gen>), Show revival graphics
          • Player - Set (Owner of (Dying unit)) Current gold to (((Owner of (Dying unit)) Current gold) - ((((Owner of (Dying unit)) Current gold) / 100) x 25))
          • Game - Display to (All players) for 20.00 seconds the text: (Player_Colors[(Player number of (Owner of (Dying unit)))] + 's|r |cffFF7600hero has fallen! Revive in 10 seconds.|r |c00FF0000(-25% Gold!|r)
        • Else - Actions
          • Wait 35.00 seconds
          • Unit - Create 1 (Unit-type of (Dying unit)) for Player 11 (Dark Green) at (Position of (Dying unit)) facing (Position of (Triggering unit))
 
Level 3
Joined
Jun 3, 2008
Messages
52
Oops. Sorry, my trigger was faulty. Instead of:
Instantly revive DyingHero at (Center of (Playable map area)), Show revival graphics
it should've been
Instantly revive DyingHero at (Center of (respawn <gen>)), Show revival graphics

Okay, this one should work, since I tested it:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Custom script: local unit udg_DyingHero
      • Set DyingHero = (Triggering unit)
      • Game - Display to (All players) the text: A hero just died. R...
      • Wait 10.00 seconds
      • Hero - Instantly revive DyingHero at (Center of respawn <gen>), Show revival graphics
      • Set DyingHero = No unit
 
Level 7
Joined
Sep 5, 2006
Messages
333
I mean the first trigger post by the thread starter... I don't see the problem, but i will make the trigger in a map and send it to you.
edit: 3 hour of hard work at last, I could not find your problem, but make another one in GUI.
 

Attachments

  • HeroRevive.w3x
    17.4 KB · Views: 94
Last edited:
Level 5
Joined
Jun 18, 2008
Messages
146
I cant find the map in my W.E, what did you call it when you save? And where can i get a LEAK CHECK PROGRAMME?
 
Level 3
Joined
Jun 3, 2008
Messages
52
To chenlimin's map:
Sorry to point out all this, but they were on my mind when I saw and previewed your map:
- Using "Hide Unit" for a hero could mean that the user sees the hero having full life, yet the hero is nowhere to be seen.
- Hero's death animation is never played since the heroes are revived instantly after they die, although this might not be a problem if this was an intended effect
- Special Effects are not destroyed - leaks.

Anyway, I tried siDeKicK's original trigger, and it seemed to work well on a blank map. Perhaps your other triggers or something in your map might be interfering with the trigger in someway. I suggest you try to debug it, or, if you don't mind that is, post the map here for us to debug it. Also try removing the "Wait" statement from your original trigger and see if the hero revives instantly.
 
Level 5
Joined
Jun 18, 2008
Messages
146
Anyway, I tried siDeKicK's original trigger, and it seemed to work well on a blank map. Perhaps your other triggers or something in your map might be interfering with the trigger in someway. I suggest you try to debug it, or, if you don't mind that is, post the map here for us to debug it. Also try removing the "Wait" statement from your original trigger and see if the hero revives instantly.

Removed the "wait" still doesn't, the person I'm working with says "it has to be leaks", i also think that.... isnt there a leak detector or something that i could look for leaks?!
 
Level 3
Joined
Jun 3, 2008
Messages
52
Correction:
My bad. Thank you, Huurka, for reminding. There is a tool for de-leaking. See Huurka's post.

I'm not sure if leaks can cause a problem as obvious as this, since leaks are usually performance problems that happen in the long-term.

Also does this trigger (and every other trigger presented in this thread) fail to work even once? Have you tried putting the triggers inside a blank test map just to make sure they work? I'm really confused. :confused:
 
Last edited:
Level 15
Joined
Sep 3, 2006
Messages
1,738
Correction:
My bad. Thank you, Huurka, for reminding. There is a tool for de-leaking. See Huurka's post.

I'm not sure if leaks can cause a problem as obvious as this, since leaks are usually performance problems that happen in the long-term.

Also does this trigger (and every other trigger presented in this thread) fail to work even once? Have you tried putting the triggers inside a blank test map just to make sure they work? I'm really confused. :confused:

Mine works perfectly fine.
 
Level 5
Joined
Jun 18, 2008
Messages
146
hmmmmm... i go to that site and it goes to TheHelper.net and it says im banned!?!??!? And i have never been there b4... :cry:.. so how can i get the programme leak check now :(?
 
Level 5
Joined
Jun 18, 2008
Messages
146
Check my LINK.

There's the leak checker.

i KNOW... that is what i SAID.. i go to the LINK and it goes to thehelper.net and when i get there it says..... You have been banned for the folowing reason: Spamming.. etc and i have NEVER been there....
 
Level 7
Joined
Sep 5, 2006
Messages
333
Did my system work on your map?
P.S Sorry about all that, I did not notice those problem as I was too sleepy to check.... working over night.....
 
Does the text display when your unit dies?
A couple things you can try also:
-Make sure the trigger is on (and not turned off by some other trigger)
-Remake the trigger-Make sure the unit isn't somehow removed (by any other trigger)

As far as I know, changeing the revive instantly thing should make it work. It doesnt look like there is a problem with it. Hell, you could always make another basic test trigger to make sure its working properly. like..

Events:
A unit dies
Conditions:
((Dying unit) is a hero) equal to true.
Actions:
Game - Display "IT WORKS!!!!" for 5 seconds

something like that
 
Level 5
Joined
Jun 18, 2008
Messages
146
Does the text display when your unit dies?
A couple things you can try also:
-Make sure the trigger is on (and not turned off by some other trigger)
-Remake the trigger-Make sure the unit isn't somehow removed (by any other trigger)

As far as I know, changeing the revive instantly thing should make it work. It doesnt look like there is a problem with it. Hell, you could always make another basic test trigger to make sure its working properly. like..

Events:
A unit dies
Conditions:
((Dying unit) is a hero) equal to true.
Actions:
Game - Display "IT WORKS!!!!" for 5 seconds

something like that
Yeah... i does show that my hero has fallen, but it does not revive!!!!!!!!!!!!!!!!!!!! :cry:
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
Hey, siDeKicK here,

My revive trigger for HERO's wont work... :cry:

Trigger:

  • Revive Hero
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Game - Display to (All players) the text: (Player_Colors[(Player number of (Owner of (Dying unit)))] + 's|r |cffFF7600hero has fallen! Revive in 10 seconds.|r)
      • Wait 10.00 seconds
      • Hero - Instantly revive (Triggering unit) at (Center of respawn <gen>), Show revival graphics
      • Special Effect - Create a special effect at (Position of (Reviving Hero)) using Abilities\Spells\Other\Awaken\Awaken.mdl
      • Special Effect - Destroy (Last created special effect)
anyone know Why :(?... it just wont REVIVE the hero that died

siDeKicK

Does it show anything?
 
Level 7
Joined
Mar 16, 2008
Messages
348
Dude my map is bugged too, i made a complex jass system to go around it(had to store all 4 abilities of the hero, location bla bla bla and then create a new hero of the same type to the same player and give the same items and abilitys etc.)
 
Level 5
Joined
Jun 18, 2008
Messages
146
Dude my map is bugged too, i made a complex jass system to go around it(had to store all 4 abilities of the hero, location bla bla bla and then create a new hero of the same type to the same player and give the same items and abilitys etc.)

I dont understand/do JASS so i dont know how :/. Can you give me an Example?
 
Level 10
Joined
Sep 6, 2007
Messages
440
Meh he would do all of those himself if he knew jass anyway... Leak checker only checks Jass codes as far as I know so don't bother using GUI for it. Another thing is, there's no reason for your trigger to not to work. Try to delete that stupid wait and use timer... It should fix your problem. And I suggest you to learn Jass if you have spare time to learn.... and save your ass from that GUI sewer.
 
Status
Not open for further replies.
Top