Trigger Help

rDs_RaVeN

New Member
Reaction score
14
hi i would like a trigger that set the gold paid to revive a hero equal to his lvl and deaths

e.g. If a hero is 5 lvl and has no death gold paid to revive is : 500
If Hero is 25 lvl and has 10 death gold paid is : 1500

thx
 

Pharaoh_

The epic journey will soon begin... Prepare!
Reaction score
136
You will need a formula

Code:
Events
 A unit dies
Conditions
 Dying unit is a hero equal to True
Actions
 Set deathcount = (deathcount) + 1
 Set GoldPaid = (Level of (Triggering unit))*deathcount
And then if it is to be revived, set gold (Player - Property) of Player to (Current Gold - (GoldPaid))
 

Pharaoh_

The epic journey will soon begin... Prepare!
Reaction score
136
You want him to revive from a tavern or instantly in a spot?
 

Pharaoh_

The epic journey will soon begin... Prepare!
Reaction score
136
http://world-editor-tutorials.thehelper.net/maps.php?view=137
Open the Map and check how the heroes revive. To be honest, i did not see any gold values, but maybe it will work for you. Maybe it is default to have your unit able of being sold again in the tavern. Else go to Object Editor and "check" the field Revives dead heroes, from False to True. I can't think of any other way. But i guess, since the tavern belongs to an ally of you and not Neutrals, then your hero's icon is displayed where you bought him from: the tavern. Check it, else use the trigger i told u.

The "set gold (Player - Property) of Player to (Current Gold - (GoldPaid))", just add the Event Unit - A unit Begins reviving
 

rDs_RaVeN

New Member
Reaction score
14
*bump* to be honest i know how to do this i just dont know how to make the trigger to activate if the hero revives before the death timer stops that means that he paid and take the money from him
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
"A unit finishes reviving" should work there.
Along with "time remaining" on your timer.


> means that he paid

Hm...
But you won't know how much.
 

rDs_RaVeN

New Member
Reaction score
14
can you show me the conditions of the trigger?
there is a condition like:
Code:
If (X)timer expires equal to false?
Code:
Events
 A unit dies
Conditions
 Dying unit is a hero equal to True
Actions
 Set deathcount = (deathcount) + 1
 Set GoldPaid = (Level of (Triggering unit))*deathcount
a trigger like that will set the money paid
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> If (X)timer expires equal to false?

Real comparison, Countdown timer - Time remaining.


> a trigger like that will set the money paid

Yes, but you're not seeing how much you will have to pay (on the tavern) before actually doing it...
 

rDs_RaVeN

New Member
Reaction score
14
thx man +to you and pharaoh

>Yes, but you're not seeing how much you will have to pay (on the tavern) before actually doing it...

will make the trigger to show a message about the money he is gonna pay

EDIT:Can i use variables in tooltips?
 

rDs_RaVeN

New Member
Reaction score
14
hm.. i need one more thing(sorry if im bother you)

here is my trigger:
Code:
Pay To Revive Hero Copy
    Events
        Unit - A unit Finishes reviving
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Remaining time for ReviveTimers[1]) Greater than or equal to 1.00
                (Remaining time for ReviveTimers[2]) Greater than or equal to 1.00
                (Remaining time for ReviveTimers[3]) Greater than or equal to 1.00
                (Remaining time for ReviveTimers[4]) Greater than or equal to 1.00
                (Remaining time for ReviveTimers[5]) Greater than or equal to 1.00
                (Remaining time for ReviveTimers[6]) Greater than or equal to 1.00
                (Remaining time for ReviveTimers[7]) Greater than or equal to 1.00
                (Remaining time for ReviveTimers[8]) Greater than or equal to 1.00
                (Remaining time for ReviveTimers[9]) Greater than or equal to 1.00
                (Remaining time for ReviveTimers[10]) Greater than or equal to 1.00
                (Remaining time for ReviveTimers[11]) Greater than or equal to 1.00
                (Remaining time for ReviveTimers[12]) Greater than or equal to 1.00
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                GoldPaid Less than or equal to ((Owner of (Reviving Hero)) Current gold)
            Then - Actions
                Player - Set (Owner of (Reviving Hero)) Current gold to (((Owner of (Reviving Hero)) Current gold) - GoldPaid)
            Else - Actions
how can i make the trigger to not revive hero if the players gold is less that the GoldPaid?
i thinking of killing the unit after it revives and remove death from multiboard but im not familiar with multiboards(im making my map on DotA Template and didnt change anything from the Multiboard triggers)
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Finishes reviving doesn't cut it... :p


My Hero died.
The only unit I have.
That's already @!#?@!.
Why would I read any texts... I already know my Hero died. I was there when it happened.
So I go find that f...ine Tavern.
Fortunately, I have enough Gold.
Click...
Waiting for absolutely ever...
More waiting for that damn stupid Hero...
At last he revives.
And instantly dies with some "explanation" that says "I don't like you".

That's clearly one of those "what the fuck" moments.


Isn't there a "begins reviving"?
If yes, you can cancel that action.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
"Begins reviving" works on Altars, but it doesn't on Taverns...

You can cancel a Tavern revive, but the trigger is not the most obvious:
Code:
Cancel Revive
    Events
        Unit - Tavern 0005 <gen> Is issued an order targeting an object
    Conditions
    Actions
        Custom script:   set udg_TempInteger = GetIssuedOrderId()
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                TempInteger Greater than or equal to 852462
                TempInteger Less than or equal to 852473
                (Unit-type of (Target unit of issued order)) Equal to Blood Mage
            Then - Actions
                Unit - Pause (Triggering unit)
                Unit - Order (Triggering unit) to Stop
                Unit - Unpause (Triggering unit)
            Else - Actions

This particular Tavern revives any Heroes that are not a Blood Mage.
 

rDs_RaVeN

New Member
Reaction score
14
i dont get this trigger...
what i can change in this i mean the condition
Code:
If GoldPaid is Greater than Players Current Gold
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top