Resurrection Trigger not firing 100% of the time!

Chao

Setting sail for fail in the sea of lame.
Reaction score
63
It's ugly, I tell you! Since I already gave you the gist of what the problem is, here's the code I've been running with.

Trigger:
  • AotS Res Start
    • Events
      • Unit - A unit Dies
    • Conditions
      • AotSOn Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • (Dying unit) Equal to PlayerHero[1]
          • (Dying unit) Equal to PlayerHero[2]
          • (Dying unit) Equal to PlayerHero[3]
          • (Dying unit) Equal to PlayerHero[4]
          • (Dying unit) Equal to PlayerHero[5]
          • (Dying unit) Equal to PlayerHero[6]
    • Actions
      • Set AotSDieTime = ((Real((Level of (Dying unit)))) / 2.00)
      • Set MultiAotSInt2[(Player number of (Owner of (Dying unit)))] = (MultiAotSInt2[(Player number of (Owner of (Dying unit)))] + 1)
      • Multiboard - Set the text for MultiAotS item in column 3, row (4 + (Player number of (Owner of (Dying unit)))) to (String(MultiAotSInt2[(Player number of (Owner of (Dying unit)))]))
      • Countdown Timer - Start ResTimer[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in AotSDieTime seconds
      • Countdown Timer - Create a timer window for ResTimer[(Player number of (Owner of (Dying unit)))] with title Resurrection in:
      • Set ResTimerWindow[(Player number of (Owner of (Dying unit)))] = (Last created timer window)
      • Countdown Timer - Show ResTimerWindow[(Player number of (Owner of (Dying unit)))] for (Owner of (Dying unit))
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Dying unit) Equal to PlayerHero[(Integer A)]
            • Then - Actions
              • Trigger - Run AotSResTriggers[(Integer A)] (checking conditions)
            • Else - Actions
              • Do nothing


Then:
Trigger:
  • AotS Res P1
    • Events
    • Conditions
      • (PlayerHero[1] is dead) Equal to True
      • AotSOn Equal to True
    • Actions
      • Wait AotSDieTime seconds
      • Countdown Timer - Hide ResTimerWindow[1]
      • Countdown Timer - Destroy ResTimerWindow[1]
      • Set AotSMemPt = (Center of AotS Res <gen>)
      • Hero - Instantly revive PlayerHero[1] at AotSMemPt, Hide revival graphics
      • Custom script: call RemoveLocation(udg_AotSMemPt)
      • Selection - Select PlayerHero[1] for Player 1 (Red)
      • Set AotSMemPt = (Position of PlayerHero[1])
      • Camera - Pan camera for Player 1 (Red) to AotSMemPt over 0.50 seconds
      • Custom script: call RemoveLocation(udg_AotSMemPt)
      • Unit Group - Add PlayerHero[1] to AotSHeroGroup

There's obviously one of those for each of the players in my game.
 

minikrampan

Ultra Cool Member
Reaction score
28
Wouln't it be better to fire a MPI timer for every player/unit that dies. And in trigger two check when it expires? Doesn't the respawn timer restart every time a hero dies? dunno just some thoughts.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
That is because it's not MPI ... :(

EDIT: And use Triggering Unit instead of Dying Unit :D

EDIT2: And it's the second trigger that doesn't work, since you made the first trigger MPI, but not the other one XD
 

WolfieeifloW

WEHZ Helper
Reaction score
372
I heard somewhere (Reliable source, can't remember who though) that using the 'actual' unit is better then "Triggering unit".
If this is wrong though I'd gladly like to see results proving so :eek: .
 

Faust

You can change this now in User CP.
Reaction score
123
Sorry for just praising vJASS and hating GUI again, but a resurrection system in GUI is almost always end up in big fail.
Seriously, you should use a premade vJASS system, that is easily used by GUI users.
 

Faust

You can change this now in User CP.
Reaction score
123
Would you shark please learn some linguistic skills before bitching on others? Thank you.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
And again, Faust being rude :rolleyes: .

As for this trigger;
I can't see what's wrong;
But the wait is eww :p .
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
I was trying to help u understand the question
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Don't worry about it SharkBait87.
I've always found Faust to be ignorant.

On-topic though;
We need Chao here to tell us what's going on :p .

EDIT: Lol, he -rep'd me back:
Faust's Angry -rep Message To Me said:
Once again, being a FUCKING RETARD IDIOT. I didn't offend anyone, I warned him not to be a dumbass. Like you are. Knock it off pathetic moron.
 

SwedishChef

New Member
Reaction score
32
I heard somewhere (Reliable source, can't remember who though) that using the 'actual' unit is better then "Triggering unit".
If this is wrong though I'd gladly like to see results proving so :eek: .

were is this reliable source?? I hardly doubt that he/she even exists, since triggering unit is the 'actual' unit in mosts cases. If you use dying unit with waits the editor tends to forget it, but this is not the case with triggering unit. So Chao try to use triggering unit instead this will probably not solve the bug since you arent using waits but it is good for the future ;). Maby there is something with some other trigger, maby were you set the hero :/. I cant see any problem with your triggers
 

Faust

You can change this now in User CP.
Reaction score
123
Child can't keep to himself... That's why you are again ignored, and for ever this time.

I'm sure all the people on this board are interested in your rep traffic, not to mention your quarrels with others.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
It was in a thread a while back in the JASS Help section Scientific.
And I honestly forget who said it :eek: .
If I have time after doing my co-op exam I'll look for the thread.

And Faust, don't spam threads because you're mad please...
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
Yay lets all -rep everyone we hate! Fun!

On-topic: Why not use a "Timer Expires" event in your second trigger instead of running it from the first then waiting?
 

Chao

Setting sail for fail in the sea of lame.
Reaction score
63
Thanks for the help/nerdrage show, guys!

The units PlayerHero[1-6] are established right at the start of the game, and I HAAATE having to use /waits, but I have found them to be substantially more reliable than countdown timers, which have given me a headache since Day 1 of becoming an Editor.

I'll try using Triggering Unit instead to identify the opponent and let you know how things go.
 

UndeadDragon

Super Moderator
Reaction score
448
Remove:

Trigger:
  • Wait AotSDieTime seconds


Change the event to Timer Expires.

EDIT: Also remove:

Trigger:
  • Trigger - Run AotSResTriggers[(Integer A)] (checking conditions)
 

vypur85

Hibernate
Reaction score
803
Don't really understand why would you want to make something MPI and end up making it not MPI again. Might as well you create 6 separate triggers. For now, apparently you have 7 have triggers, which defeats the purpose of making it MPI.

Generally, all the array for the second trigger can be changed into 'Owner of (Triggering unit)'. And you can probably combine the second trigger with the first. While removing the Integer A loop, which isn't necessary. Also, in the second trigger, the first condition makes no sense because the event fires because the unit dies, so no point checking if the unit is dead again.
 

Chao

Setting sail for fail in the sea of lame.
Reaction score
63
The reason I'm not using an expiring timer is because that's what caused the problems in the first place... This used to be one trigger, and 1 in 10 heroes used to not resurrect. I have it out for Countdown Timers. They're "for display purposes only" to me.

I'm not dumb with triggers... I have a really good grasp of things, I think, but there are aspects that just throw me off, as you've seen... beyond this, is there a place where I can learn these abbreviations? I don't know what MPI, GUI, or MUI even mean.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top