HELP with items!! and hero reviving

Axtyler#1

New Member
Reaction score
1
ok so im making a map where there are item recipies. I get how to make recipies but what i dont get is how to make it say in the information box that it requires certain items to make it. For example in dota when u want to buy an item it says in the information tab
Requires
Ring of Regeneration
Ring of Protection

My other question is how to make it so that heroes revive in 20 seconds after they die. Again i use the example from dota. When your hero dies in dota, it shows a timer telling you that you have 20 seconds left until you hero is revived

Any help is greatly appreciated:D
 

Komaqtion

You can change this now in User CP.
Reaction score
469
1. You just add those line to the tooltip in the object editor ;)
2. Does it have to be MUI ?? (MUI = Multi Unit Instanceable = Can be cast by several unit at the same time AND WORKING FOR ALL OF THEM) or can it just be MPI ? ((MPI = Multi Player Instanceable = Can be cast by one unit per player at the same time AND WORKING FOR ALL OF THEM)
 

Axtyler#1

New Member
Reaction score
1
Thanks and Confused

1. ok i get what ur saying bout my 1st question but, do you kno how to make the letters yellow like in dota? In dota it says in yellow "Requires" and then what it requires in white.
2. Im not sure if the MUI thing is what i want or not=/ all i want to do is if lets say Blues hero dies in the middle of the map then he will revive in 20 seconds at the top of the map.
 

Danis[h]

New Member
Reaction score
19
For hero revival I use this in my map

Just add a timer window and change the wait to 20 seconds.
It will work even if the player has more than one hero.
Trigger:
  • Hero Respawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
      • ((Dying unit) belongs to an ally of Player 1 (Red)) Equal to True
    • Actions
      • Custom script: local player HeroOwner = GetOwningPlayer(GetDyingUnit())
      • Custom script: local unit ress = GetDyingUnit()
      • Custom script: local location t = udg_HeroRespawnLoc[GetConvertedPlayerId(GetOwningPlayer(ress))]
      • Game - Display to (Player group((Owner of (Dying unit)))) the text: |c00ffcc00Your hero...
      • Wait 15.00 seconds
      • Custom script: call ReviveHeroLoc( ress, t, true )
      • Custom script: call PanCameraToTimedLocForPlayer( HeroOwner, t, 0.00 )
      • Custom script: set ress = null
      • Custom script: set t = null
      • Custom script: set HeroOwner = null
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Here's a little more efficient trigger :D
JASS:
function Trig_Revive_Heroes_Conditions takes nothing returns boolean
    if IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true then
        return true
    endif
    return false
endfunction

function Trig_Revive_Heroes_Actions takes nothing returns nothing
    local unit u = GetTriggerUnit()
    local player p =GetOwningPlayer(u)
    local location loc = Location(GetRectCenterX(gg_rct_Revive_Area),GetRectCenterY(gg_rct_Revive_Area))
    call TriggerSleepAction(20)
    call ReviveHeroLoc( u, loc,true )
    call PanCameraTo(GetLocationX(loc),GetLocationY(loc))
    call RemoveLocation(loc)
    set u = null
    set p = null
endfunction

//===========================================================================
function InitTrig_Revive_Heroes takes nothing returns nothing
    set gg_trg_Revive_Heroes = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Revive_Heroes, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddCondition( gg_trg_Revive_Heroes, Condition( function Trig_Revive_Heroes_Conditions ) )
    call TriggerAddAction( gg_trg_Revive_Heroes, function Trig_Revive_Heroes_Actions )
endfunction


or

Trigger:
  • Revive Heroes Copy
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Custom script: local unit u = GetTriggerUnit()
      • Custom script: local player p =GetOwningPlayer(u)
      • Custom script: local location loc = Location(GetRectCenterX(gg_rct_Revive_Area),GetRectCenterY(gg_rct_Revive_Area))
      • Custom script: call TriggerSleepAction(20)
      • Custom script: call ReviveHeroLoc( u, loc,true )
      • Custom script: call PanCameraTo(GetLocationX(loc),GetLocationY(loc))
      • Custom script: call RemoveLocation(loc)
      • Custom script: set u = null
      • Custom script: set p = null


The only thing that needs changing is:
JASS:
gg_rct_Revive_Area

change that to gg_rct_(Your_Region) and it should work ;)
 

Danis[h]

New Member
Reaction score
19
I didn't remove the location because it's pointing to a different udg_ variable that I have to use later :)
 

simonake

New Member
Reaction score
72
Too hard?

Why not
Trigger:
  • Events
    • Unit - A Unit Dies
    • Conditions
      • (Triggering unit) is a Hero Equal to TRUE
    • Actions
      • Wait 10 seconds
      • Unit - Revive (Triggering unit) Instantly at <>
 

Danis[h]

New Member
Reaction score
19
Too hard?

Why not
Trigger:
  • Events
    • Unit - A Unit Dies
    • Conditions
      • (Triggering unit) is a Hero Equal to TRUE
    • Actions
      • Wait 10 seconds
      • Unit - Revive (Triggering unit) Instantly at <>

what will happen then if two heroes die within the timeframe of 10 seconds.
the first hero dies at 0, and the second hero dies 3 seconds later? The second hero would revive 7 seconds later, leaving the first dying hero dead indefinately?
 

simonake

New Member
Reaction score
72
No that's not what's happening.

(Triggering unit) is like a local. It has the same property of a local. It work for unit respawn it should for hero too.
 

Danis[h]

New Member
Reaction score
19
No that's not what's happening.

(Triggering unit) is like a local. It has the same property of a local. It work for unit respawn it should for hero too.

I just tested this, and it seems that you're right... Didn't know :)
 

Axtyler#1

New Member
Reaction score
1
Thank YOU!!

No that's not what's happening.

(Triggering unit) is like a local. It has the same property of a local. It work for unit respawn it should for hero too.

Yea his does work. And thanks for the other guys for trying. Yours probably worked fine im just not familiar enough with Editor to get custom scripts yet D=. If i could id give rep to each of ya thanks again:thup:
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Just so you know, triggering unit can get a little unstable after too long waits :S
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top