Trigger won't resurrect a hero

meehael

New Member
Reaction score
6
Hi all,

I'm having this trigger:
Code:
Untitled Trigger 009
    Events
        Unit - A unit Becomes revivable
    Conditions
    Actions
        Wait 2.00 seconds
        Camera - Pan camera for (Owner of [I]MyHero[/I]) to Temp_Point over 1.00 seconds
        Wait 1.00 seconds
        Hero - Instantly revive [I]MyHero[/I] at Temp_Point, Show revival graphics
        Camera - Set a spacebar-point for (Owner of [I]MyHero[/I]) at Temp_Point
Camera panning works each time the hero is killed, but reviving the hero doesn't. Why? Because of the wait of 1 sec?

MyHero is a unit variable which I'm using in this trigger:
Code:
Untitled Trigger 010
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
    Actions
        Set [I]MyHero[/I] = (Dying unit)

Thanks,
Regards!
 

demotry241

Don't Ever Categorize Yourself.
Reaction score
105
change "my hero" to triggering unit, or dying unit..




change event and condition

unit dies

condition

triggering unit is a hero = true.
 

meehael

New Member
Reaction score
6
I need it that way. I've made a long trigger short. I'm using an array of MyHero, actually. So that, if, for ex., 10 players die at nearly the same time, they get properly resurrected.

Strangely, when I remove that "Wait 1 sec." action, it works perfectly, but if I put that wait, it doesn't work (at least, not always). Why's that?

Thanks!
 

vypur85

Hibernate
Reaction score
803
Code:
Untitled Trigger 010
    Events
        Unit - A unit Dies
    Conditions
        ((Dying unit) is A Hero) Equal to True
    Actions
        Wait 2.00 seconds
        Temp_Point = Position of (Triggering unit)
        Camera - Pan camera for (Owner of (Triggering unit)) to Temp_Point over 1.00 seconds
        Custom script    : call RemoveLocation (udg_Temp_Point)
        Wait 1.00 seconds
        Temp_Point = Position of (Triggering unit)
        Hero - Instantly revive (Triggering unit) at Temp_Point, Show revival graphics
        Camera - Set a spacebar-point for (Owner of (Triggering Unit)) at Temp_Point
        Custom script    : call RemoveLocation (udg_Temp_Point)

The trigger as suggested by all the above posts.


> an array of MyHero... 10 players die at nearly the same time... get properly resurrected

(Triggering unit) is MUI. The above trigger I provided works for any simultaneous death.
 

meehael

New Member
Reaction score
6
Ok, thanks! :thup:

What's the difference between using Dying unit and Triggering unit?
 

wellwish3r

wishes wells.
Reaction score
52
Ok, thanks! :thup:

What's the difference between Dying unit and Triggering unit?

(Triggering Unit) most unit events, including Unit is attacked, Unit dies etc.... (Dying Unit) can only be used if the event is Unit Dies
 

meehael

New Member
Reaction score
6
And, is Dying unit MUI?

For example:
If one hero dies, and another dies within half a second from the first one, won't Dying or Triggering unit be overwritten by the second hero? Won't it try to resurrect the second hero twice? Please, explain.

Thanks!
 

wellwish3r

wishes wells.
Reaction score
52
And, is Dying unit MUI?

For example:
If one hero dies, and another dies within half a second from the first one, won't Dying or Triggering unit be overwritten by the second hero? Won't it try to resurrect the second hero twice? Please, explain.

Thanks!

Triggering and Dying Units can create multiple instances of themselves in the same trigger. And they dont get lost in waits.
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
Triggering and Dying Units can create multiple instances of themselves in the same trigger. And they dont get lost in waits.

Not exacly true, when useing dieing unit you want to pay close attenchen to what your bone decay is set to in the game play constants. Say you got it set to 15 and then you use a trigger with a 20 secound wait, well the dieing unit wont work any more, but triggering unit will still work.
 
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