Reviving hero

kallieblakie

New Member
Reaction score
5
When a hero dies, it triggers and automatically revives after X- seconds at the (player start location)[triggered, like dota]. But if I revive it using the taven (paying some gold) via ability [Revive Hero Instantly], it does not revive at the (player start location), but revives beside the taven. How do i trigger it such that it revives at the (player start location)?

I'm currently using this code that doesn't work.


Code:
Forced Revival
    Events
        Unit - A unit Is issued an order with no target
    Conditions
        (Issued order) Equal to (Order(awaken))
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Casting unit)) Equal to Player 1 (Red)
            Then - Actions
                Unit Group - Pick every unit in (Units in Elfspawn <gen>) and do (Actions)
                    Loop - Actions
                        Unit - Move (Picked unit) instantly to ((Owner of (Triggering unit)) start location)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Casting unit)) Equal to Player 5 (Yellow)
            Then - Actions
                Unit Group - Pick every unit in (Units in OrcSpawn <gen>) and do (Actions)
                    Loop - Actions
                        Unit - Move (Picked unit) instantly to ((Owner of (Triggering unit)) start location)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Casting unit)) Equal to Player 9 (Gray)
            Then - Actions
                Unit Group - Pick every unit in (Units in HumanSpawn <gen>) and do (Actions)
                    Loop - Actions
                        Unit - Move (Picked unit) instantly to ((Owner of (Triggering unit)) start location)
            Else - Actions

Elf, Orc, HumanSpawn refers to the region around the taven. But it doesn't work.
 
Code:
Untitled Trigger 003
    Events
        Unit - A unit enters TavernRegion <gen>
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        Unit - Move (Triggering unit) instantly to (Center of Base <gen>)
Simple, just create a small region around the tavern and have this little trigger here, btw, the tarvern should then be an unreachable place. If you dont want this, say so cause there are like 100 other ways. :)
 
Note the bolded parts
When a hero dies, it triggers and automatically revives after X- seconds at the (player start location)[triggered, like dota]. But if I revive it using the taven (paying some gold) via ability [Revive Hero Instantly], it does not revive at the (player start location), but revives beside the taven. How do i trigger it such that it revives at the (player start location)?

I'm currently using this code that doesn't work.


Code:
Forced Revival
    Events
        Unit - [B]A unit Is issued an order with no target[/B]
    Conditions
        (Issued order) Equal to (Order(awaken))
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of [B](Casting unit))[/B] Equal to Player 1 (Red)
            Then - Actions
                Unit Group - Pick every unit in (Units in Elfspawn <gen>) and do (Actions)
                    Loop - Actions
                        Unit - Move (Picked unit) instantly to ((Owner of (Triggering unit)) start location)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of [B](Casting unit)) [/B]Equal to Player 5 (Yellow)
            Then - Actions
                Unit Group - Pick every unit in (Units in OrcSpawn <gen>) and do (Actions)
                    Loop - Actions
                        Unit - Move (Picked unit) instantly to ((Owner of (Triggering unit)) start location)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of [B](Casting unit)) [/B]Equal to Player 9 (Gray)
            Then - Actions
                Unit Group - Pick every unit in (Units in HumanSpawn <gen>) and do (Actions)
                    Loop - Actions
                        Unit - Move (Picked unit) instantly to ((Owner of (Triggering unit)) start location)
            Else - Actions

Elf, Orc, HumanSpawn refers to the region around the taven. But it doesn't work.

There is no casting unit for that event, thats why it doesn't work. To fix this, replace (Casting unit) with (Ordered unit).
 
Note the bolded parts


There is no casting unit for that event, thats why it doesn't work. To fix this, replace (Casting unit) with (Ordered unit).

And that will fix it :rolleyes:

Except all those leaks *UGH MY EYES :banghead: *
 
Code:
Untitled Trigger 003
    Events
        Unit - A unit enters TavernRegion <gen>
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        Unit - Move (Triggering unit) instantly to (Center of Base <gen>)
Simple, just create a small region around the tavern and have this little trigger here, btw, the tarvern should then be an unreachable place. If you dont want this, say so cause there are like 100 other ways. :)
No i don't want it to be unreachable. any other way? I don't know what's the command when it revives a hero.

And that will fix it :rolleyes:

Except all those leaks *UGH MY EYES :banghead: *
What ordered unit? then what will be the condition?

Does moving to start location cause leaks also? damn.
 
Code:
Untitled Trigger 004
    Events
        Unit - A unit Finishes reviving
    Conditions
    Actions
        Unit - Move (Triggering unit) instantly to (Random point in Region 002 <gen>)
use that?
That event, specially... and triggering unit, to refer to the hero that is revived/awaken if you wanna call it that.

>>Does moving to start location cause leaks also?
Yes.
 
Anyone has any idea how the dota way works? I was hoping to make it as similar as possible. Since this trigger would move ALL units in the region to their start location.
 
Code:
Forced Revival
    Events
        Unit - A unit Is issued an order with no target
    Conditions
        (Issued order) Equal to (Order(awaken))
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Ordered unit)) Equal to Player 1 (Red)
            Then - Actions
                Unit Group - Pick every unit in (Units in Elfspawn <gen>) and do (Actions)
                    Loop - Actions
                        Set Temp_Position = ((Owner of (Picked unit)) start location)
                        Unit - Move (Picked unit) instantly to Temp_Position
                        Selection - Select (Picked unit) for (Owner of (Picked unit))
                        Camera - Pan camera for (Owner of (Picked unit)) to Temp_Position over 0.00 seconds
                        Custom script:   call RemoveLocation (udg_Temp_Position)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Ordered unit)) Equal to Player 5 (Yellow)
            Then - Actions
                Unit Group - Pick every unit in (Units in OrcSpawn <gen>) and do (Actions)
                    Loop - Actions
                        Set Temp_Position = ((Owner of (Picked unit)) start location)
                        Unit - Move (Picked unit) instantly to Temp_Position
                        Selection - Select (Picked unit) for (Owner of (Picked unit))
                        Camera - Pan camera for (Owner of (Picked unit)) to Temp_Position over 0.00 seconds
                        Custom script:   call RemoveLocation (udg_Temp_Position)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Ordered unit)) Equal to Player 9 (Gray)
            Then - Actions
                Unit Group - Pick every unit in (Units in HumanSpawn <gen>) and do (Actions)
                    Loop - Actions
                        Set Temp_Position = ((Owner of (Picked unit)) start location)
                        Unit - Move (Picked unit) instantly to Temp_Position
                        Selection - Select (Picked unit) for (Owner of (Picked unit))
                        Camera - Pan camera for (Owner of (Picked unit)) to Temp_Position over 0.00 seconds
                        Custom script:   call RemoveLocation (udg_Temp_Position)
            Else - Actions

I changed the scripting, and it still doesn't work. Anyone knows why?
 
Code:
Untitled Trigger 004
    Events
        Unit - A unit Finishes reviving
    Conditions
    Actions
        Unit - Move (Triggering unit) instantly to (Random point in Region 002 <gen>)
use that?
That event, specially... and triggering unit, to refer to the hero that is revived/awaken if you wanna call it that.

>>Does moving to start location cause leaks also?
Yes.
This doesn't work. I've tried.
 
Where did you get that "awaken" order from? And, you sure it doesn't have a target?

Regardless, "finishes reviving" can't possibly fail as event for reviving...
 
No need to use an event linked to reviving.

Code:
Untitled Trigger 003
    Events
        Unit - A unit enters TavernRegion <gen>
    Conditions
        ((Triggering unit) is A Hero) Equal to True
    Actions
        Unit - Move (Triggering unit) instantly to (Center of Base <gen>)
Simple, just create a small region around the tavern and have this little trigger here, btw, the tarvern should then be an unreachable place. If you dont want this, say so cause there are like 100 other ways. :)

This would be the best way imo.

When the hero will revive, it will enter the region around the tavern and the trigger will move it.

Make sure no other hero can access the tavern's region though! :p

EDIT: For a reachable area though you can check if the hero is the right one upon entering. Or check if it matches the right player :p
 
If you use my last trigger you dont have to think about that noone else can also enter that spot or getting close to the tavern, because that wont fire the trigger... And... It works, it were something you did wrong, try again. And if you still didnt manage to get it to work, show us what you tried.
And your event there mate, "no target..blablabla..".
It doesnt work like that, no target things is not awaken a hero from a tavern, or revive it from an altar. But using abilities like THunder Clap, War Stomp, berserk or learning an ability.....
 
I believe "Finishes reviving..." has nothing to do with tavern awakening. Instead, it would work only with altars or trigger reviving.

If that is the case, then you can only check when the unit enters the region around the tavern. That is, I think, the only possible outcome :)

Like I said you can check if it is the correct unit being revived. Depends on what you want.

Anyhow, testing it yourself first would be the best thing to do right now!
 
>>I believe "Finishes reviving..." has nothing to do with tavern awakening. Instead, it would work only with altars or trigger reviving.
Try again... :) Awaken from tavern/reviving in altar = Event ; finishes reviving, dont worry.

>>Like I said you can check if it is the correct unit being revived
Why bother? It is just to move the hero to either base 1 (if ally of player 1) if not ally of player 1 move to base 2.
Most custom maps got limit 1 hero per player anyway...If a player revives a hero/awakens it most likely would be that one... :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top